summaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-06-18 07:20:20 +0000
committerBill Wendling <isanbard@gmail.com>2013-06-18 07:20:20 +0000
commit99cb622041a0839c7dfcf0263c5102a305a0fdb5 (patch)
tree7890d4314940f3ef004cd8c2877343f14620a69a /lib/MC/MCContext.cpp
parentc4e6b540f05932eea37ca10b6c1fded522777954 (diff)
downloadllvm-99cb622041a0839c7dfcf0263c5102a305a0fdb5.tar.gz
llvm-99cb622041a0839c7dfcf0263c5102a305a0fdb5.tar.bz2
llvm-99cb622041a0839c7dfcf0263c5102a305a0fdb5.tar.xz
Use pointers to the MCAsmInfo and MCRegInfo.
Someone may want to do something crazy, like replace these objects if they change or something. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index 80de55eade..d5788332d5 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -32,7 +32,7 @@ typedef StringMap<const MCSectionELF*> ELFUniqueMapTy;
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 SourceMgr *mgr,
bool DoAutoReset) :
SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi),
@@ -130,7 +130,7 @@ MCSymbol *MCContext::CreateSymbol(StringRef Name) {
// Determine whether this is an assembler temporary or normal label, if used.
bool isTemporary = false;
if (AllowTemporaryLabels)
- isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix());
+ isTemporary = Name.startswith(MAI->getPrivateGlobalPrefix());
StringMapEntry<bool> *NameEntry = &UsedNames.GetOrCreateValue(Name);
if (NameEntry->getValue()) {
@@ -160,7 +160,7 @@ MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) {
MCSymbol *MCContext::CreateTempSymbol() {
SmallString<128> NameSV;
raw_svector_ostream(NameSV)
- << MAI.getPrivateGlobalPrefix() << "tmp" << NextUniqueID++;
+ << MAI->getPrivateGlobalPrefix() << "tmp" << NextUniqueID++;
return CreateSymbol(NameSV);
}
@@ -179,14 +179,14 @@ unsigned MCContext::GetInstance(int64_t LocalLabelVal) {
}
MCSymbol *MCContext::CreateDirectionalLocalSymbol(int64_t LocalLabelVal) {
- return GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix()) +
+ return GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) +
Twine(LocalLabelVal) +
"\2" +
Twine(NextInstance(LocalLabelVal)));
}
MCSymbol *MCContext::GetDirectionalLocalSymbol(int64_t LocalLabelVal,
int bORf) {
- return GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix()) +
+ return GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) +
Twine(LocalLabelVal) +
"\2" +
Twine(GetInstance(LocalLabelVal) + bORf));