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 | a26eae64ddf607549f9e47046d46ea5b9ec648b4 (patch) | |
tree | c120bcc5dae1ed6c28cdf9b86b0dac5b9c71a65e /lib/CodeGen/MachineInstr.cpp | |
parent | 19fee415f63ddb78fca703085fe56510be3e058c (diff) |
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.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 9cfff82233..b8c8563eab 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/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 << "]"; } |