mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Devang pointed out that this code should use DIScope instead of
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
This commit is contained in:
@ -1148,10 +1148,10 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
|
|||||||
// TODO: print InlinedAtLoc information
|
// TODO: print InlinedAtLoc information
|
||||||
|
|
||||||
DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
|
DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
|
||||||
DICompileUnit CU(DLT.Scope);
|
DIScope Scope(DLT.Scope);
|
||||||
OS << " dbg:";
|
OS << " dbg:";
|
||||||
if (!CU.isNull())
|
if (!Scope.isNull())
|
||||||
OS << CU.getDirectory() << '/' << CU.getFilename() << ":";
|
OS << Scope.getDirectory() << ':' << Scope.getFilename() << ':';
|
||||||
OS << DLT.Line << ":" << DLT.Col;
|
OS << DLT.Line << ":" << DLT.Col;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user