mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
Add SourceMgr to MCContext for backend diagnostics.
llvm-svn: 149090
This commit is contained in:
parent
c63a45ebe6
commit
fbf782200a
@ -43,6 +43,8 @@ namespace llvm {
|
|||||||
public:
|
public:
|
||||||
typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
|
typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
|
||||||
private:
|
private:
|
||||||
|
/// The SourceMgr for this object, if any.
|
||||||
|
const SourceMgr *SrcMgr;
|
||||||
|
|
||||||
/// The MCAsmInfo for this target.
|
/// The MCAsmInfo for this target.
|
||||||
const MCAsmInfo &MAI;
|
const MCAsmInfo &MAI;
|
||||||
@ -137,9 +139,11 @@ namespace llvm {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MCContext(const MCAsmInfo &MAI, const MCRegisterInfo &MRI,
|
explicit MCContext(const MCAsmInfo &MAI, const MCRegisterInfo &MRI,
|
||||||
const MCObjectFileInfo *MOFI);
|
const MCObjectFileInfo *MOFI, const SourceMgr *Mgr = 0);
|
||||||
~MCContext();
|
~MCContext();
|
||||||
|
|
||||||
|
const SourceMgr *getSourceManager() const { return SrcMgr; }
|
||||||
|
|
||||||
const MCAsmInfo &getAsmInfo() const { return MAI; }
|
const MCAsmInfo &getAsmInfo() const { return MAI; }
|
||||||
|
|
||||||
const MCRegisterInfo &getRegisterInfo() const { return MRI; }
|
const MCRegisterInfo &getRegisterInfo() const { return MRI; }
|
||||||
|
@ -28,8 +28,8 @@ typedef StringMap<const MCSectionCOFF*> COFFUniqueMapTy;
|
|||||||
|
|
||||||
|
|
||||||
MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri,
|
MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri,
|
||||||
const MCObjectFileInfo *mofi) :
|
const MCObjectFileInfo *mofi, const SourceMgr *mgr) :
|
||||||
MAI(mai), MRI(mri), MOFI(mofi),
|
SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi),
|
||||||
Allocator(), Symbols(Allocator), UsedNames(Allocator),
|
Allocator(), Symbols(Allocator), UsedNames(Allocator),
|
||||||
NextUniqueID(0),
|
NextUniqueID(0),
|
||||||
CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
|
CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
|
||||||
|
Loading…
Reference in New Issue
Block a user