diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-04-30 23:22:31 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-04-30 23:22:31 +0000 |
| commit | a5037484a4999e2f4e15b5e97da2a4d47ac22576 (patch) | |
| tree | befe0187d86d03c253605879ae39ad5e08fbe36c /llvm/lib/CodeGen/MachineInstr.cpp | |
| parent | 5e965472b95824ea251c7adfa7205d22d3fcaa05 (diff) | |
| download | bcm5719-llvm-a5037484a4999e2f4e15b5e97da2a4d47ac22576.tar.gz bcm5719-llvm-a5037484a4999e2f4e15b5e97da2a4d47ac22576.zip | |
Make DebugLoc independent of DwarfWriter.
-Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable*
-Remove DwarfWriter::getOrCreateSourceID
-Make necessary changes for the above (fix callsites, etc.)
llvm-svn: 70520
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 9cfff82233d..b8c8563eab4 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -22,6 +22,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetInstrDesc.h" #include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/Analysis/DebugInfo.h" #include "llvm/Support/LeakDetector.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Streams.h" @@ -979,8 +980,10 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const { if (!debugLoc.isUnknown()) { const MachineFunction *MF = getParent()->getParent(); DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc); + DICompileUnit CU(DLT.CompileUnit); + std::string Dir, Fn; OS << " [dbg: " - << DLT.Src << "," + << CU.getDirectory(Dir) << '/' << CU.getFilename(Fn) << "," << DLT.Line << "," << DLT.Col << "]"; } |

