[llvm] [NVPTX][DebugInfo] avoid emitting extra .loc directives (PR #84584)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 15:19:46 PDT 2024


================
@@ -489,8 +489,12 @@ void NVPTXAsmPrinter::emitFunctionEntryLabel() {
   OutStreamer->emitRawText(StringRef("{\n"));
   setAndEmitFunctionVirtualRegisters(*MF);
   // Emit initial .loc debug directive for correct relocation symbol data.
-  if (MMI && MMI->hasDebugInfo())
-    emitInitialRawDwarfLocDirective(*MF);
+  const DISubprogram *SP = MF->getFunction().getSubprogram();
+  if (SP) {
----------------
AlexMaclean wrote:

Fixed

https://github.com/llvm/llvm-project/pull/84584


More information about the llvm-commits mailing list