mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
Add SourceMgr to MCContext for backend diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
53fa56e8dc
commit
3662e5ce70
@ -43,6 +43,8 @@ namespace llvm {
|
||||
public:
|
||||
typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
|
||||
private:
|
||||
/// The SourceMgr for this object, if any.
|
||||
const SourceMgr *SrcMgr;
|
||||
|
||||
/// The MCAsmInfo for this target.
|
||||
const MCAsmInfo &MAI;
|
||||
@ -137,9 +139,11 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
explicit MCContext(const MCAsmInfo &MAI, const MCRegisterInfo &MRI,
|
||||
const MCObjectFileInfo *MOFI);
|
||||
const MCObjectFileInfo *MOFI, const SourceMgr *Mgr = 0);
|
||||
~MCContext();
|
||||
|
||||
const SourceMgr *getSourceManager() const { return SrcMgr; }
|
||||
|
||||
const MCAsmInfo &getAsmInfo() const { return MAI; }
|
||||
|
||||
const MCRegisterInfo &getRegisterInfo() const { return MRI; }
|
||||
|
@ -28,8 +28,8 @@ typedef StringMap<const MCSectionCOFF*> COFFUniqueMapTy;
|
||||
|
||||
|
||||
MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri,
|
||||
const MCObjectFileInfo *mofi) :
|
||||
MAI(mai), MRI(mri), MOFI(mofi),
|
||||
const MCObjectFileInfo *mofi, const SourceMgr *mgr) :
|
||||
SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi),
|
||||
Allocator(), Symbols(Allocator), UsedNames(Allocator),
|
||||
NextUniqueID(0),
|
||||
CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
|
||||
|
Loading…
Reference in New Issue
Block a user