Devang pointed out that this code should use DIScope instead of
authorDan Gohman <gohman@apple.com>
Tue, 1 Dec 2009 00:45:56 +0000 (00:45 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 1 Dec 2009 00:45:56 +0000 (00:45 +0000)
DICompileUnit. This code now prints debug filenames successfully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90181 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineInstr.cpp

index f11026fde7a0d0ec468e52233f336fb3dd858892..f73a5a362112f3701820b748b6a9a5164992a995 100644 (file)
@@ -1148,10 +1148,10 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
     // TODO: print InlinedAtLoc information
 
     DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
-    DICompileUnit CU(DLT.Scope);
+    DIScope Scope(DLT.Scope);
     OS << " dbg:";
-    if (!CU.isNull())
-      OS << CU.getDirectory() << '/' << CU.getFilename() << ":";
+    if (!Scope.isNull())
+      OS << Scope.getDirectory() << ':' << Scope.getFilename() << ':';
     OS << DLT.Line << ":" << DLT.Col;
   }