================
@@ -2859,6 +2856,15 @@ bool AsmPrinter::doFinalization(Module &M) {
   // sections after DWARF.
   for (const auto &IFunc : M.ifuncs())
     emitGlobalIFunc(M, IFunc);
+  if (TM.getTargetTriple().isOSBinFormatXCOFF() && hasDebugInfo()) {
+    // Emit section end. This is used to tell the debug line section where the
+    // end is for a text section if we don't use .loc to represent the debug
+    // line.
+    auto *Sec = OutContext.getObjectFileInfo()->getTextSection();
+    OutStreamer->switchSectionNoPrint(Sec);
----------------
mandlebug wrote:

I know you just moved this code, but this has been bugging me. How does the 
switch section no print work when we are emitting assembly? Why didn't we just 
switch sections explicitly and emit the label? Not questions for this review in 
particular but I may need to double back and try to figure out why this is this 
way in particular.

https://github.com/llvm/llvm-project/pull/153049
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to