mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
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
This commit is contained in:
@@ -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 << "]";
|
||||
}
|
||||
|
Reference in New Issue
Block a user