MC: Clean up method names in MCContext.

The naming was a mish-mash of old and new style. Update to be consistent
with the new. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237594 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2015-05-18 18:43:14 +00:00
parent 0799eb1140
commit 19696daa21
76 changed files with 297 additions and 296 deletions

View File

@@ -462,7 +462,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
if (GVKind.isThreadLocal() && MAI->hasMachoTBSSDirective()) {
// Emit the .tbss symbol
MCSymbol *MangSym =
OutContext.GetOrCreateSymbol(GVSym->getName() + Twine("$tlv$init"));
OutContext.getOrCreateSymbol(GVSym->getName() + Twine("$tlv$init"));
if (GVKind.isThreadBSS()) {
TheSection = getObjFileLowering().getTLSBSSSection();
@@ -563,7 +563,7 @@ void AsmPrinter::EmitFunctionHeader() {
if (CurrentFnBegin) {
if (MAI->useAssignmentForEHBegin()) {
MCSymbol *CurPos = OutContext.CreateTempSymbol();
MCSymbol *CurPos = OutContext.createTempSymbol();
OutStreamer->EmitLabel(CurPos);
OutStreamer->EmitAssignment(CurrentFnBegin,
MCSymbolRefExpr::Create(CurPos, OutContext));
@@ -1128,7 +1128,7 @@ bool AsmPrinter::doFinalization(Module &M) {
OutStreamer->SwitchSection(ReadOnlySection);
MCSymbol *AddrSymbol =
OutContext.GetOrCreateSymbol(StringRef("__morestack_addr"));
OutContext.getOrCreateSymbol(StringRef("__morestack_addr"));
OutStreamer->EmitLabel(AddrSymbol);
unsigned PtrSize = TM.getDataLayout()->getPointerSize(0);
@@ -1443,7 +1443,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
if (TM.getRelocationModel() == Reloc::Static &&
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".constructors_used");
OutStreamer->EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
OutStreamer->EmitSymbolAttribute(OutContext.getOrCreateSymbol(Sym),
MCSA_Reference);
}
return true;
@@ -1455,7 +1455,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
if (TM.getRelocationModel() == Reloc::Static &&
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".destructors_used");
OutStreamer->EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
OutStreamer->EmitSymbolAttribute(OutContext.getOrCreateSymbol(Sym),
MCSA_Reference);
}
return true;
@@ -2293,7 +2293,7 @@ MCSymbol *AsmPrinter::GetBlockAddressSymbol(const BasicBlock *BB) const {
/// GetCPISymbol - Return the symbol for the specified constant pool entry.
MCSymbol *AsmPrinter::GetCPISymbol(unsigned CPID) const {
const DataLayout *DL = TM.getDataLayout();
return OutContext.GetOrCreateSymbol
return OutContext.getOrCreateSymbol
(Twine(DL->getPrivateGlobalPrefix()) + "CPI" + Twine(getFunctionNumber())
+ "_" + Twine(CPID));
}
@@ -2307,7 +2307,7 @@ MCSymbol *AsmPrinter::GetJTISymbol(unsigned JTID, bool isLinkerPrivate) const {
/// FIXME: privatize to AsmPrinter.
MCSymbol *AsmPrinter::GetJTSetSymbol(unsigned UID, unsigned MBBID) const {
const DataLayout *DL = TM.getDataLayout();
return OutContext.GetOrCreateSymbol
return OutContext.getOrCreateSymbol
(Twine(DL->getPrivateGlobalPrefix()) + Twine(getFunctionNumber()) + "_" +
Twine(UID) + "_set_" + Twine(MBBID));
}
@@ -2323,7 +2323,7 @@ MCSymbol *AsmPrinter::getSymbolWithGlobalValueBase(const GlobalValue *GV,
MCSymbol *AsmPrinter::GetExternalSymbolSymbol(StringRef Sym) const {
SmallString<60> NameStr;
Mang->getNameWithPrefix(NameStr, Sym);
return OutContext.GetOrCreateSymbol(NameStr);
return OutContext.getOrCreateSymbol(NameStr);
}

View File

@@ -997,7 +997,7 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
return;
if (!PrevLabel) {
PrevLabel = MMI->getContext().CreateTempSymbol();
PrevLabel = MMI->getContext().createTempSymbol();
Asm->OutStreamer->EmitLabel(PrevLabel);
}
I->second = PrevLabel;
@@ -1025,7 +1025,7 @@ void DwarfDebug::endInstruction() {
// We need a label after this instruction.
if (!PrevLabel) {
PrevLabel = MMI->getContext().CreateTempSymbol();
PrevLabel = MMI->getContext().createTempSymbol();
Asm->OutStreamer->EmitLabel(PrevLabel);
}
I->second = PrevLabel;

View File

@@ -439,7 +439,7 @@ void EHStreamer::emitExceptionTable() {
// Emit the LSDA.
MCSymbol *GCCETSym =
Asm->OutContext.GetOrCreateSymbol(Twine("GCC_except_table")+
Asm->OutContext.getOrCreateSymbol(Twine("GCC_except_table")+
Twine(Asm->getFunctionNumber()));
Asm->OutStreamer->EmitLabel(GCCETSym);
Asm->OutStreamer->EmitLabel(Asm->getCurExceptionSym());

View File

@@ -60,7 +60,7 @@ static void EmitCamlGlobal(const Module &M, AsmPrinter &AP, const char *Id) {
SmallString<128> TmpStr;
AP.Mang->getNameWithPrefix(TmpStr, SymName);
MCSymbol *Sym = AP.OutContext.GetOrCreateSymbol(TmpStr);
MCSymbol *Sym = AP.OutContext.getOrCreateSymbol(TmpStr);
AP.OutStreamer->EmitSymbolAttribute(Sym, MCSA_Global);
AP.OutStreamer->EmitLabel(Sym);

View File

@@ -274,7 +274,7 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
GlobalValue::getRealLinkageName(ParentF->getName());
MCSymbol *FuncInfoXData =
Asm->OutContext.GetOrCreateSymbol(Twine("$cppxdata$", ParentLinkageName));
Asm->OutContext.getOrCreateSymbol(Twine("$cppxdata$", ParentLinkageName));
OS.EmitValue(createImageRel32(FuncInfoXData), 4);
// The Itanium LSDA table sorts similar landing pads together to simplify the
@@ -362,13 +362,13 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
MCSymbol *TryBlockMapXData = nullptr;
MCSymbol *IPToStateXData = nullptr;
if (!FuncInfo.UnwindMap.empty())
UnwindMapXData = Asm->OutContext.GetOrCreateSymbol(
UnwindMapXData = Asm->OutContext.getOrCreateSymbol(
Twine("$stateUnwindMap$", ParentLinkageName));
if (!FuncInfo.TryBlockMap.empty())
TryBlockMapXData = Asm->OutContext.GetOrCreateSymbol(
TryBlockMapXData = Asm->OutContext.getOrCreateSymbol(
Twine("$tryMap$", ParentLinkageName));
if (!FuncInfo.IPToStateList.empty())
IPToStateXData = Asm->OutContext.GetOrCreateSymbol(
IPToStateXData = Asm->OutContext.getOrCreateSymbol(
Twine("$ip2state$", ParentLinkageName));
// FuncInfo {
@@ -426,7 +426,7 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
if (!TBME.HandlerArray.empty())
HandlerMapXData =
Asm->OutContext.GetOrCreateSymbol(Twine("$handlerMap$")
Asm->OutContext.getOrCreateSymbol(Twine("$handlerMap$")
.concat(Twine(I))
.concat("$")
.concat(ParentLinkageName));

View File

@@ -94,7 +94,7 @@ void WinCodeViewLineTables::maybeRecordLocation(DebugLoc DL,
}
FileNameRegistry.add(Filename);
MCSymbol *MCL = Asm->MMI->getContext().CreateTempSymbol();
MCSymbol *MCL = Asm->MMI->getContext().createTempSymbol();
Asm->OutStreamer->EmitLabel(MCL);
CurFn->Instrs.push_back(MCL);
InstrInfo[MCL] = InstrInfoTy(Filename, DL.getLine());
@@ -201,15 +201,15 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
if (GVName.startswith("\01?"))
FuncName = GVName.substr(1);
// Emit a symbol subsection, required by VS2012+ to find function boundaries.
MCSymbol *SymbolsBegin = Asm->MMI->getContext().CreateTempSymbol(),
*SymbolsEnd = Asm->MMI->getContext().CreateTempSymbol();
MCSymbol *SymbolsBegin = Asm->MMI->getContext().createTempSymbol(),
*SymbolsEnd = Asm->MMI->getContext().createTempSymbol();
Asm->OutStreamer->AddComment("Symbol subsection for " + Twine(FuncName));
Asm->EmitInt32(COFF::DEBUG_SYMBOL_SUBSECTION);
EmitLabelDiff(*Asm->OutStreamer, SymbolsBegin, SymbolsEnd);
Asm->OutStreamer->EmitLabel(SymbolsBegin);
{
MCSymbol *ProcSegmentBegin = Asm->MMI->getContext().CreateTempSymbol(),
*ProcSegmentEnd = Asm->MMI->getContext().CreateTempSymbol();
MCSymbol *ProcSegmentBegin = Asm->MMI->getContext().createTempSymbol(),
*ProcSegmentEnd = Asm->MMI->getContext().createTempSymbol();
EmitLabelDiff(*Asm->OutStreamer, ProcSegmentBegin, ProcSegmentEnd, 2);
Asm->OutStreamer->EmitLabel(ProcSegmentBegin);
@@ -256,8 +256,8 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
// Emit a line table subsection, requred to do PC-to-file:line lookup.
Asm->OutStreamer->AddComment("Line table subsection for " + Twine(FuncName));
Asm->EmitInt32(COFF::DEBUG_LINE_TABLE_SUBSECTION);
MCSymbol *LineTableBegin = Asm->MMI->getContext().CreateTempSymbol(),
*LineTableEnd = Asm->MMI->getContext().CreateTempSymbol();
MCSymbol *LineTableBegin = Asm->MMI->getContext().createTempSymbol(),
*LineTableEnd = Asm->MMI->getContext().createTempSymbol();
EmitLabelDiff(*Asm->OutStreamer, LineTableBegin, LineTableEnd);
Asm->OutStreamer->EmitLabel(LineTableBegin);
@@ -288,7 +288,7 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
// in the string table.
Asm->OutStreamer->AddComment(
"Segment for file '" + Twine(CurFilename) + "' begins");
MCSymbol *FileSegmentBegin = Asm->MMI->getContext().CreateTempSymbol();
MCSymbol *FileSegmentBegin = Asm->MMI->getContext().createTempSymbol();
Asm->OutStreamer->EmitLabel(FileSegmentBegin);
Asm->EmitInt32(8 * IndexInStringTable);
@@ -298,7 +298,7 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
// Full size of the segment for this filename, including the prev two
// records.
FileSegmentEnd = Asm->MMI->getContext().CreateTempSymbol();
FileSegmentEnd = Asm->MMI->getContext().createTempSymbol();
EmitLabelDiff(*Asm->OutStreamer, FileSegmentBegin, FileSegmentEnd);
}