OSDN Git Service

Technically DIFile scope should also be handled here.
authorDevang Patel <dpatel@apple.com>
Thu, 28 Oct 2010 17:30:52 +0000 (17:30 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 28 Oct 2010 17:30:52 +0000 (17:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117563 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 5187d3e..b9c7d7a 100644 (file)
@@ -3024,6 +3024,10 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col,
       DICompileUnit CU(S);
       Dir = CU.getDirectory();
       Fn = CU.getFilename();
+    } else if (Scope.isFile()) {
+      DIFile F(S);
+      Dir = F.getDirectory();
+      Fn = F.getFilename();
     } else if (Scope.isSubprogram()) {
       DISubprogram SP(S);
       Dir = SP.getDirectory();