mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
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. llvm-svn: 237594
This commit is contained in:
parent
552d093b67
commit
95c79d189f
@ -241,27 +241,27 @@ namespace llvm {
|
||||
|
||||
/// Create and return a new linker temporary symbol with a unique but
|
||||
/// unspecified name.
|
||||
MCSymbol *CreateLinkerPrivateTempSymbol();
|
||||
MCSymbol *createLinkerPrivateTempSymbol();
|
||||
|
||||
/// Create and return a new assembler temporary symbol with a unique but
|
||||
/// unspecified name.
|
||||
MCSymbol *CreateTempSymbol();
|
||||
MCSymbol *createTempSymbol();
|
||||
|
||||
MCSymbol *createTempSymbol(const Twine &Name, bool AlwaysAddSuffix);
|
||||
|
||||
/// Create the definition of a directional local symbol for numbered label
|
||||
/// (used for "1:" definitions).
|
||||
MCSymbol *CreateDirectionalLocalSymbol(unsigned LocalLabelVal);
|
||||
MCSymbol *createDirectionalLocalSymbol(unsigned LocalLabelVal);
|
||||
|
||||
/// Create and return a directional local symbol for numbered label (used
|
||||
/// for "1b" or 1f" references).
|
||||
MCSymbol *GetDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before);
|
||||
MCSymbol *getDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before);
|
||||
|
||||
/// Lookup the symbol inside with the specified \p Name. If it exists,
|
||||
/// return it. If not, create a forward reference and return it.
|
||||
///
|
||||
/// \param Name - The symbol name, which must be unique across all symbols.
|
||||
MCSymbol *GetOrCreateSymbol(const Twine &Name);
|
||||
MCSymbol *getOrCreateSymbol(const Twine &Name);
|
||||
|
||||
MCSymbol *getOrCreateSectionSymbol(const MCSectionELF &Section);
|
||||
|
||||
@ -274,7 +274,7 @@ namespace llvm {
|
||||
MCSymbol *getOrCreateParentFrameOffsetSymbol(StringRef FuncName);
|
||||
|
||||
/// Get the symbol for \p Name, or null.
|
||||
MCSymbol *LookupSymbol(const Twine &Name) const;
|
||||
MCSymbol *lookupSymbol(const Twine &Name) const;
|
||||
|
||||
/// getSymbols - Get a reference for the symbol table for clients that
|
||||
/// want to, for example, iterate over all symbols. 'const' because we
|
||||
@ -401,7 +401,7 @@ namespace llvm {
|
||||
void setMainFileName(StringRef S) { MainFileName = S; }
|
||||
|
||||
/// Creates an entry in the dwarf file and directory tables.
|
||||
unsigned GetDwarfFile(StringRef Directory, StringRef FileName,
|
||||
unsigned getDwarfFile(StringRef Directory, StringRef FileName,
|
||||
unsigned FileNumber, unsigned CUID);
|
||||
|
||||
bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID = 0);
|
||||
@ -458,7 +458,7 @@ namespace llvm {
|
||||
CurrentDwarfLoc.setDiscriminator(Discriminator);
|
||||
DwarfLocSeen = true;
|
||||
}
|
||||
void ClearDwarfLocSeen() { DwarfLocSeen = false; }
|
||||
void clearDwarfLocSeen() { DwarfLocSeen = false; }
|
||||
|
||||
bool getDwarfLocSeen() { return DwarfLocSeen; }
|
||||
const MCDwarfLoc &getCurrentDwarfLoc() { return CurrentDwarfLoc; }
|
||||
@ -509,16 +509,17 @@ namespace llvm {
|
||||
SecureLogUsed = Value;
|
||||
}
|
||||
|
||||
void *Allocate(unsigned Size, unsigned Align = 8) {
|
||||
void *allocate(unsigned Size, unsigned Align = 8) {
|
||||
return Allocator.Allocate(Size, Align);
|
||||
}
|
||||
void Deallocate(void *Ptr) {
|
||||
void deallocate(void *Ptr) {
|
||||
}
|
||||
|
||||
// Unrecoverable error has occurred. Display the best diagnostic we can
|
||||
// and bail via exit(1). For now, most MC backend errors are unrecoverable.
|
||||
// FIXME: We should really do something about that.
|
||||
LLVM_ATTRIBUTE_NORETURN void FatalError(SMLoc L, const Twine &Msg) const;
|
||||
LLVM_ATTRIBUTE_NORETURN void reportFatalError(SMLoc L,
|
||||
const Twine &Msg) const;
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
@ -549,7 +550,7 @@ namespace llvm {
|
||||
/// \return The allocated memory. Could be NULL.
|
||||
inline void *operator new(size_t Bytes, llvm::MCContext &C,
|
||||
size_t Alignment = 8) throw() {
|
||||
return C.Allocate(Bytes, Alignment);
|
||||
return C.allocate(Bytes, Alignment);
|
||||
}
|
||||
/// \brief Placement delete companion to the new above.
|
||||
///
|
||||
@ -559,7 +560,7 @@ inline void *operator new(size_t Bytes, llvm::MCContext &C,
|
||||
/// the MCContext throws in the object constructor.
|
||||
inline void operator delete(void *Ptr, llvm::MCContext &C, size_t)
|
||||
throw () {
|
||||
C.Deallocate(Ptr);
|
||||
C.deallocate(Ptr);
|
||||
}
|
||||
|
||||
/// This placement form of operator new[] uses the MCContext's allocator for
|
||||
@ -583,7 +584,7 @@ inline void operator delete(void *Ptr, llvm::MCContext &C, size_t)
|
||||
/// \return The allocated memory. Could be NULL.
|
||||
inline void *operator new[](size_t Bytes, llvm::MCContext& C,
|
||||
size_t Alignment = 8) throw() {
|
||||
return C.Allocate(Bytes, Alignment);
|
||||
return C.allocate(Bytes, Alignment);
|
||||
}
|
||||
|
||||
/// \brief Placement delete[] companion to the new[] above.
|
||||
@ -593,7 +594,7 @@ inline void *operator new[](size_t Bytes, llvm::MCContext& C,
|
||||
/// is called implicitly by the compiler if a placement new[] expression using
|
||||
/// the MCContext throws in the object constructor.
|
||||
inline void operator delete[](void *Ptr, llvm::MCContext &C) throw () {
|
||||
C.Deallocate(Ptr);
|
||||
C.deallocate(Ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ void GCMachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
MCSymbol *GCMachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MI,
|
||||
DebugLoc DL) const {
|
||||
MCSymbol *Label = MBB.getParent()->getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = MBB.getParent()->getContext().createTempSymbol();
|
||||
BuildMI(MBB, MI, DL, TII->get(TargetOpcode::GC_LABEL)).addSym(Label);
|
||||
return Label;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ MCSymbol *MachineBasicBlock::getSymbol() const {
|
||||
const MachineFunction *MF = getParent();
|
||||
MCContext &Ctx = MF->getContext();
|
||||
const char *Prefix = Ctx.getAsmInfo()->getPrivateLabelPrefix();
|
||||
CachedMCSymbol = Ctx.GetOrCreateSymbol(Twine(Prefix) + "BB" +
|
||||
CachedMCSymbol = Ctx.getOrCreateSymbol(Twine(Prefix) + "BB" +
|
||||
Twine(MF->getFunctionNumber()) +
|
||||
"_" + Twine(getNumber()));
|
||||
}
|
||||
|
@ -468,14 +468,14 @@ MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,
|
||||
SmallString<60> Name;
|
||||
raw_svector_ostream(Name)
|
||||
<< Prefix << "JTI" << getFunctionNumber() << '_' << JTI;
|
||||
return Ctx.GetOrCreateSymbol(Name);
|
||||
return Ctx.getOrCreateSymbol(Name);
|
||||
}
|
||||
|
||||
/// getPICBaseSymbol - Return a function-local symbol to represent the PIC
|
||||
/// base.
|
||||
MCSymbol *MachineFunction::getPICBaseSymbol() const {
|
||||
const DataLayout *DL = getTarget().getDataLayout();
|
||||
return Ctx.GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
|
||||
return Ctx.getOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
|
||||
Twine(getFunctionNumber())+"$pb");
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ MCSymbol *MMIAddrLabelMap::getAddrLabelSymbol(BasicBlock *BB) {
|
||||
BBCallbacks.back().setMap(this);
|
||||
Entry.Index = BBCallbacks.size()-1;
|
||||
Entry.Fn = BB->getParent();
|
||||
MCSymbol *Result = Context.CreateTempSymbol();
|
||||
MCSymbol *Result = Context.createTempSymbol();
|
||||
Entry.Symbols = Result;
|
||||
return Result;
|
||||
}
|
||||
@ -401,7 +401,7 @@ void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad,
|
||||
/// addLandingPad - Provide the label of a try LandingPad block.
|
||||
///
|
||||
MCSymbol *MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) {
|
||||
MCSymbol *LandingPadLabel = Context.CreateTempSymbol();
|
||||
MCSymbol *LandingPadLabel = Context.createTempSymbol();
|
||||
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
|
||||
LP.LandingPadLabel = LandingPadLabel;
|
||||
return LandingPadLabel;
|
||||
|
@ -4979,7 +4979,7 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI,
|
||||
if (LandingPad) {
|
||||
// Insert a label before the invoke call to mark the try range. This can be
|
||||
// used to detect deletion of the invoke via the MachineModuleInfo.
|
||||
BeginLabel = MMI.getContext().CreateTempSymbol();
|
||||
BeginLabel = MMI.getContext().createTempSymbol();
|
||||
|
||||
// For SjLj, keep track of which landing pads go with which invokes
|
||||
// so as to maintain the ordering of pads in the LSDA.
|
||||
@ -5022,7 +5022,7 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI,
|
||||
if (LandingPad) {
|
||||
// Insert a label at the end of the invoke call to mark the try range. This
|
||||
// can be used to detect deletion of the invoke via the MachineModuleInfo.
|
||||
MCSymbol *EndLabel = MMI.getContext().CreateTempSymbol();
|
||||
MCSymbol *EndLabel = MMI.getContext().createTempSymbol();
|
||||
DAG.setRoot(DAG.getEHLabel(getCurSDLoc(), getRoot(), EndLabel));
|
||||
|
||||
// Inform MachineModuleInfo of range.
|
||||
|
@ -274,7 +274,7 @@ void StackMaps::recordStackMapOpers(const MachineInstr &MI, uint64_t ID,
|
||||
bool recordResult) {
|
||||
|
||||
MCContext &OutContext = AP.OutStreamer->getContext();
|
||||
MCSymbol *MILabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *MILabel = OutContext.createTempSymbol();
|
||||
AP.OutStreamer->EmitLabel(MILabel);
|
||||
|
||||
LocationVec Locations;
|
||||
@ -529,7 +529,7 @@ void StackMaps::serializeToStackMapSection() {
|
||||
OS.SwitchSection(StackMapSection);
|
||||
|
||||
// Emit a dummy symbol to force section inclusion.
|
||||
OS.EmitLabel(OutContext.GetOrCreateSymbol(Twine("__LLVM_StackMaps")));
|
||||
OS.EmitLabel(OutContext.getOrCreateSymbol(Twine("__LLVM_StackMaps")));
|
||||
|
||||
// Serialize data.
|
||||
DEBUG(dbgs() << "********** Stack Map Output **********\n");
|
||||
|
@ -51,7 +51,7 @@ MCSymbol *TargetLoweringObjectFileELF::getCFIPersonalitySymbol(
|
||||
MachineModuleInfo *MMI) const {
|
||||
unsigned Encoding = getPersonalityEncoding();
|
||||
if ((Encoding & 0x80) == dwarf::DW_EH_PE_indirect)
|
||||
return getContext().GetOrCreateSymbol(StringRef("DW.ref.") +
|
||||
return getContext().getOrCreateSymbol(StringRef("DW.ref.") +
|
||||
TM.getSymbol(GV, Mang)->getName());
|
||||
if ((Encoding & 0x70) == dwarf::DW_EH_PE_absptr)
|
||||
return TM.getSymbol(GV, Mang);
|
||||
@ -63,7 +63,7 @@ void TargetLoweringObjectFileELF::emitPersonalityValue(MCStreamer &Streamer,
|
||||
const MCSymbol *Sym) const {
|
||||
SmallString<64> NameData("DW.ref.");
|
||||
NameData += Sym->getName();
|
||||
MCSymbol *Label = getContext().GetOrCreateSymbol(NameData);
|
||||
MCSymbol *Label = getContext().getOrCreateSymbol(NameData);
|
||||
Streamer.EmitSymbolAttribute(Label, MCSA_Hidden);
|
||||
Streamer.EmitSymbolAttribute(Label, MCSA_Weak);
|
||||
StringRef Prefix = ".data.";
|
||||
@ -525,7 +525,7 @@ emitModuleFlags(MCStreamer &Streamer,
|
||||
SectionKind::getDataNoRel());
|
||||
Streamer.SwitchSection(S);
|
||||
Streamer.EmitLabel(getContext().
|
||||
GetOrCreateSymbol(StringRef("L_OBJC_IMAGE_INFO")));
|
||||
getOrCreateSymbol(StringRef("L_OBJC_IMAGE_INFO")));
|
||||
Streamer.EmitIntValue(VersionVal, 4);
|
||||
Streamer.EmitIntValue(ImageInfoFlags, 4);
|
||||
Streamer.AddBlankLine();
|
||||
@ -758,7 +758,7 @@ const MCExpr *TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(
|
||||
Name += DL->getPrivateGlobalPrefix();
|
||||
Name += Sym->getName();
|
||||
Name += Suffix;
|
||||
MCSymbol *Stub = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Stub = Ctx.getOrCreateSymbol(Name);
|
||||
|
||||
MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(Stub);
|
||||
if (!StubSym.getPointer())
|
||||
|
@ -37,7 +37,7 @@ void ConstantPool::emitEntries(MCStreamer &Streamer) {
|
||||
|
||||
const MCExpr *ConstantPool::addEntry(const MCExpr *Value, MCContext &Context,
|
||||
unsigned Size) {
|
||||
MCSymbol *CPEntryLabel = Context.CreateTempSymbol();
|
||||
MCSymbol *CPEntryLabel = Context.createTempSymbol();
|
||||
|
||||
Entries.push_back(ConstantPoolEntry(CPEntryLabel, Value, Size));
|
||||
return MCSymbolRefExpr::Create(CPEntryLabel, Context);
|
||||
|
@ -782,14 +782,14 @@ void ELFObjectWriter::RecordRelocation(MCAssembler &Asm,
|
||||
// or (A + C - R). If B = R + K and the relocation is not pcrel, we can
|
||||
// replace B to implement it: (A - R - K + C)
|
||||
if (IsPCRel)
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
"No relocation available to represent this relative expression");
|
||||
|
||||
const MCSymbol &SymB = RefB->getSymbol();
|
||||
|
||||
if (SymB.isUndefined())
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
Twine("symbol '") + SymB.getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
@ -797,12 +797,12 @@ void ELFObjectWriter::RecordRelocation(MCAssembler &Asm,
|
||||
assert(!SymB.isAbsolute() && "Should have been folded");
|
||||
const MCSection &SecB = SymB.getSection();
|
||||
if (&SecB != &FixupSection)
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(), "Cannot represent a difference across sections");
|
||||
|
||||
const MCSymbolData &SymBD = Asm.getSymbolData(SymB);
|
||||
if (::isWeak(SymBD))
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(), "Cannot represent a subtraction with a weak symbol");
|
||||
|
||||
uint64_t SymBOffset = Layout.getSymbolOffset(&SymBD);
|
||||
@ -928,7 +928,7 @@ void ELFObjectWriter::computeSymbolTable(
|
||||
// FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed?
|
||||
if (NeedsGOT) {
|
||||
StringRef Name = "_GLOBAL_OFFSET_TABLE_";
|
||||
MCSymbol *Sym = Asm.getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Asm.getContext().getOrCreateSymbol(Name);
|
||||
MCSymbolData &Data = Asm.getOrCreateSymbolData(*Sym);
|
||||
Data.setExternal(true);
|
||||
MCELF::SetBinding(Data, ELF::STB_GLOBAL);
|
||||
|
@ -132,7 +132,7 @@ MCAsmInfo::getExprForFDESymbol(const MCSymbol *Sym,
|
||||
|
||||
MCContext &Context = Streamer.getContext();
|
||||
const MCExpr *Res = MCSymbolRefExpr::Create(Sym, Context);
|
||||
MCSymbol *PCSym = Context.CreateTempSymbol();
|
||||
MCSymbol *PCSym = Context.createTempSymbol();
|
||||
Streamer.EmitLabel(PCSym);
|
||||
const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, Context);
|
||||
return MCBinaryExpr::CreateSub(Res, PC, Context);
|
||||
|
@ -193,7 +193,7 @@ const MCSymbol *MCAsmLayout::getBaseSymbol(const MCSymbol &Symbol) const {
|
||||
|
||||
const MCSymbolRefExpr *RefB = Value.getSymB();
|
||||
if (RefB)
|
||||
Assembler.getContext().FatalError(
|
||||
Assembler.getContext().reportFatalError(
|
||||
SMLoc(), Twine("symbol '") + RefB->getSymbol().getName() +
|
||||
"' could not be evaluated in a subtraction expression");
|
||||
|
||||
@ -206,7 +206,7 @@ const MCSymbol *MCAsmLayout::getBaseSymbol(const MCSymbol &Symbol) const {
|
||||
const MCSymbolData &ASD = Asm.getSymbolData(ASym);
|
||||
if (ASD.isCommon()) {
|
||||
// FIXME: we should probably add a SMLoc to MCExpr.
|
||||
Asm.getContext().FatalError(SMLoc(),
|
||||
Asm.getContext().reportFatalError(SMLoc(),
|
||||
"Common symbol " + ASym.getName() +
|
||||
" cannot be used in assignment expr");
|
||||
}
|
||||
@ -489,7 +489,7 @@ bool MCAssembler::evaluateFixup(const MCAsmLayout &Layout,
|
||||
// fixup and records a relocation if one is needed.
|
||||
const MCExpr *Expr = Fixup.getValue();
|
||||
if (!Expr->EvaluateAsRelocatable(Target, &Layout, &Fixup))
|
||||
getContext().FatalError(Fixup.getLoc(), "expected relocatable expression");
|
||||
getContext().reportFatalError(Fixup.getLoc(), "expected relocatable expression");
|
||||
|
||||
bool IsPCRel = Backend.getFixupKindInfo(
|
||||
Fixup.getKind()).Flags & MCFixupKindInfo::FKF_IsPCRel;
|
||||
|
@ -98,7 +98,7 @@ void MCContext::reset() {
|
||||
// Symbol Manipulation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) {
|
||||
MCSymbol *MCContext::getOrCreateSymbol(const Twine &Name) {
|
||||
SmallString<128> NameSV;
|
||||
StringRef NameRef = Name.toStringRef(NameSV);
|
||||
|
||||
@ -135,12 +135,12 @@ MCSymbol *MCContext::getOrCreateSectionSymbol(const MCSectionELF &Section) {
|
||||
|
||||
MCSymbol *MCContext::getOrCreateFrameAllocSymbol(StringRef FuncName,
|
||||
unsigned Idx) {
|
||||
return GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + FuncName +
|
||||
return getOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + FuncName +
|
||||
"$frame_escape_" + Twine(Idx));
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::getOrCreateParentFrameOffsetSymbol(StringRef FuncName) {
|
||||
return GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + FuncName +
|
||||
return getOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + FuncName +
|
||||
"$parent_frame_offset");
|
||||
}
|
||||
|
||||
@ -181,13 +181,13 @@ MCSymbol *MCContext::createTempSymbol(const Twine &Name, bool AlwaysAddSuffix) {
|
||||
return CreateSymbol(NameSV, AlwaysAddSuffix);
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::CreateLinkerPrivateTempSymbol() {
|
||||
MCSymbol *MCContext::createLinkerPrivateTempSymbol() {
|
||||
SmallString<128> NameSV;
|
||||
raw_svector_ostream(NameSV) << MAI->getLinkerPrivateGlobalPrefix() << "tmp";
|
||||
return CreateSymbol(NameSV, true);
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::CreateTempSymbol() {
|
||||
MCSymbol *MCContext::createTempSymbol() {
|
||||
return createTempSymbol("tmp", true);
|
||||
}
|
||||
|
||||
@ -209,16 +209,16 @@ MCSymbol *MCContext::getOrCreateDirectionalLocalSymbol(unsigned LocalLabelVal,
|
||||
unsigned Instance) {
|
||||
MCSymbol *&Sym = LocalSymbols[std::make_pair(LocalLabelVal, Instance)];
|
||||
if (!Sym)
|
||||
Sym = CreateTempSymbol();
|
||||
Sym = createTempSymbol();
|
||||
return Sym;
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::CreateDirectionalLocalSymbol(unsigned LocalLabelVal) {
|
||||
MCSymbol *MCContext::createDirectionalLocalSymbol(unsigned LocalLabelVal) {
|
||||
unsigned Instance = NextInstance(LocalLabelVal);
|
||||
return getOrCreateDirectionalLocalSymbol(LocalLabelVal, Instance);
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::GetDirectionalLocalSymbol(unsigned LocalLabelVal,
|
||||
MCSymbol *MCContext::getDirectionalLocalSymbol(unsigned LocalLabelVal,
|
||||
bool Before) {
|
||||
unsigned Instance = GetInstance(LocalLabelVal);
|
||||
if (!Before)
|
||||
@ -226,7 +226,7 @@ MCSymbol *MCContext::GetDirectionalLocalSymbol(unsigned LocalLabelVal,
|
||||
return getOrCreateDirectionalLocalSymbol(LocalLabelVal, Instance);
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::LookupSymbol(const Twine &Name) const {
|
||||
MCSymbol *MCContext::lookupSymbol(const Twine &Name) const {
|
||||
SmallString<128> NameSV;
|
||||
StringRef NameRef = Name.toStringRef(NameSV);
|
||||
return Symbols.lookup(NameRef);
|
||||
@ -299,7 +299,7 @@ const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type,
|
||||
const char *BeginSymName) {
|
||||
MCSymbol *GroupSym = nullptr;
|
||||
if (!Group.empty())
|
||||
GroupSym = GetOrCreateSymbol(Group);
|
||||
GroupSym = getOrCreateSymbol(Group);
|
||||
|
||||
return getELFSection(Section, Type, Flags, EntrySize, GroupSym, UniqueID,
|
||||
BeginSymName, nullptr);
|
||||
@ -353,7 +353,7 @@ MCContext::getCOFFSection(StringRef Section, unsigned Characteristics,
|
||||
int Selection, const char *BeginSymName) {
|
||||
MCSymbol *COMDATSymbol = nullptr;
|
||||
if (!COMDATSymName.empty()) {
|
||||
COMDATSymbol = GetOrCreateSymbol(COMDATSymName);
|
||||
COMDATSymbol = getOrCreateSymbol(COMDATSymName);
|
||||
COMDATSymName = COMDATSymbol->getName();
|
||||
}
|
||||
|
||||
@ -411,11 +411,11 @@ MCContext::getAssociativeCOFFSection(const MCSectionCOFF *Sec,
|
||||
// Dwarf Management
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// GetDwarfFile - takes a file name an number to place in the dwarf file and
|
||||
/// getDwarfFile - takes a file name an number to place in the dwarf file and
|
||||
/// directory tables. If the file number has already been allocated it is an
|
||||
/// error and zero is returned and the client reports the error, else the
|
||||
/// allocated file number is returned. The file numbers may be in any order.
|
||||
unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName,
|
||||
unsigned MCContext::getDwarfFile(StringRef Directory, StringRef FileName,
|
||||
unsigned FileNumber, unsigned CUID) {
|
||||
MCDwarfLineTable &Table = MCDwarfLineTablesCUMap[CUID];
|
||||
return Table.getFile(Directory, FileName, FileNumber);
|
||||
@ -442,7 +442,7 @@ void MCContext::finalizeDwarfSections(MCStreamer &MCOS) {
|
||||
assert(sec->second.first && "Start symbol must be set by now");
|
||||
MCOS.SwitchSection(sec->first);
|
||||
if (MCOS.mayHaveInstructions()) {
|
||||
MCSymbol *SectionEndSym = context.CreateTempSymbol();
|
||||
MCSymbol *SectionEndSym = context.createTempSymbol();
|
||||
MCOS.EmitLabel(SectionEndSym);
|
||||
sec->second.second = SectionEndSym;
|
||||
++sec;
|
||||
@ -454,7 +454,7 @@ void MCContext::finalizeDwarfSections(MCStreamer &MCOS) {
|
||||
}
|
||||
}
|
||||
|
||||
void MCContext::FatalError(SMLoc Loc, const Twine &Msg) const {
|
||||
void MCContext::reportFatalError(SMLoc Loc, const Twine &Msg) const {
|
||||
// If we have a source manager and a location, use it. Otherwise just
|
||||
// use the generic report_fatal_error().
|
||||
if (!SrcMgr || Loc == SMLoc())
|
||||
|
@ -87,7 +87,7 @@ bool MCExternalSymbolizer::tryAddingSymbolicOperand(MCInst &MI,
|
||||
if (SymbolicOp.AddSymbol.Present) {
|
||||
if (SymbolicOp.AddSymbol.Name) {
|
||||
StringRef Name(SymbolicOp.AddSymbol.Name);
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
Add = MCSymbolRefExpr::Create(Sym, Ctx);
|
||||
} else {
|
||||
Add = MCConstantExpr::Create((int)SymbolicOp.AddSymbol.Value, Ctx);
|
||||
@ -98,7 +98,7 @@ bool MCExternalSymbolizer::tryAddingSymbolicOperand(MCInst &MI,
|
||||
if (SymbolicOp.SubtractSymbol.Present) {
|
||||
if (SymbolicOp.SubtractSymbol.Name) {
|
||||
StringRef Name(SymbolicOp.SubtractSymbol.Name);
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
Sub = MCSymbolRefExpr::Create(Sym, Ctx);
|
||||
} else {
|
||||
Sub = MCConstantExpr::Create((int)SymbolicOp.SubtractSymbol.Value, Ctx);
|
||||
|
@ -69,7 +69,7 @@ void MCLineEntry::Make(MCObjectStreamer *MCOS, const MCSection *Section) {
|
||||
return;
|
||||
|
||||
// Create a symbol at in the current section for use in the line entry.
|
||||
MCSymbol *LineSym = MCOS->getContext().CreateTempSymbol();
|
||||
MCSymbol *LineSym = MCOS->getContext().createTempSymbol();
|
||||
// Set the value of the symbol to use for the MCLineEntry.
|
||||
MCOS->EmitLabel(LineSym);
|
||||
|
||||
@ -80,7 +80,7 @@ void MCLineEntry::Make(MCObjectStreamer *MCOS, const MCSection *Section) {
|
||||
MCLineEntry LineEntry(LineSym, DwarfLoc);
|
||||
|
||||
// clear DwarfLocSeen saying the current .loc info is now used.
|
||||
MCOS->getContext().ClearDwarfLocSeen();
|
||||
MCOS->getContext().clearDwarfLocSeen();
|
||||
|
||||
// Add the line entry to this section's entries.
|
||||
MCOS->getContext()
|
||||
@ -245,7 +245,7 @@ static const MCExpr *forceExpAbs(MCStreamer &OS, const MCExpr* Expr) {
|
||||
if (Context.getAsmInfo()->hasAggressiveSymbolFolding())
|
||||
return Expr;
|
||||
|
||||
MCSymbol *ABS = Context.CreateTempSymbol();
|
||||
MCSymbol *ABS = Context.createTempSymbol();
|
||||
OS.EmitAssignment(ABS, Expr);
|
||||
return MCSymbolRefExpr::Create(ABS, Context);
|
||||
}
|
||||
@ -264,12 +264,12 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS,
|
||||
// Create a symbol at the beginning of the line table.
|
||||
MCSymbol *LineStartSym = Label;
|
||||
if (!LineStartSym)
|
||||
LineStartSym = context.CreateTempSymbol();
|
||||
LineStartSym = context.createTempSymbol();
|
||||
// Set the value of the symbol, as we are at the start of the line table.
|
||||
MCOS->EmitLabel(LineStartSym);
|
||||
|
||||
// Create a symbol for the end of the section (to be set when we get there).
|
||||
MCSymbol *LineEndSym = context.CreateTempSymbol();
|
||||
MCSymbol *LineEndSym = context.createTempSymbol();
|
||||
|
||||
// The first 4 bytes is the total length of the information for this
|
||||
// compilation unit (not including these 4 bytes for the length).
|
||||
@ -280,7 +280,7 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS,
|
||||
MCOS->EmitIntValue(2, 2);
|
||||
|
||||
// Create a symbol for the end of the prologue (to be set when we get there).
|
||||
MCSymbol *ProEndSym = context.CreateTempSymbol(); // Lprologue_end
|
||||
MCSymbol *ProEndSym = context.createTempSymbol(); // Lprologue_end
|
||||
|
||||
// Length of the prologue, is the next 4 bytes. Which is the start of the
|
||||
// section to the end of the prologue. Not including the 4 bytes for the
|
||||
@ -640,9 +640,9 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
|
||||
|
||||
// Create a symbol at the start and end of this section used in here for the
|
||||
// expression to calculate the length in the header.
|
||||
MCSymbol *InfoStart = context.CreateTempSymbol();
|
||||
MCSymbol *InfoStart = context.createTempSymbol();
|
||||
MCOS->EmitLabel(InfoStart);
|
||||
MCSymbol *InfoEnd = context.CreateTempSymbol();
|
||||
MCSymbol *InfoEnd = context.createTempSymbol();
|
||||
|
||||
// First part: the header.
|
||||
|
||||
@ -863,18 +863,18 @@ void MCGenDwarfInfo::Emit(MCStreamer *MCOS) {
|
||||
|
||||
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfInfoSection());
|
||||
if (CreateDwarfSectionSymbols) {
|
||||
InfoSectionSymbol = context.CreateTempSymbol();
|
||||
InfoSectionSymbol = context.createTempSymbol();
|
||||
MCOS->EmitLabel(InfoSectionSymbol);
|
||||
}
|
||||
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfAbbrevSection());
|
||||
if (CreateDwarfSectionSymbols) {
|
||||
AbbrevSectionSymbol = context.CreateTempSymbol();
|
||||
AbbrevSectionSymbol = context.createTempSymbol();
|
||||
MCOS->EmitLabel(AbbrevSectionSymbol);
|
||||
}
|
||||
if (UseRangesSection) {
|
||||
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfRangesSection());
|
||||
if (CreateDwarfSectionSymbols) {
|
||||
RangesSectionSymbol = context.CreateTempSymbol();
|
||||
RangesSectionSymbol = context.createTempSymbol();
|
||||
MCOS->EmitLabel(RangesSectionSymbol);
|
||||
}
|
||||
}
|
||||
@ -932,7 +932,7 @@ void MCGenDwarfLabelEntry::Make(MCSymbol *Symbol, MCStreamer *MCOS,
|
||||
// values so that they don't have things like an ARM thumb bit from the
|
||||
// original symbol. So when used they won't get a low bit set after
|
||||
// relocation.
|
||||
MCSymbol *Label = context.CreateTempSymbol();
|
||||
MCSymbol *Label = context.createTempSymbol();
|
||||
MCOS->EmitLabel(Label);
|
||||
|
||||
// Create and entry for the info and add it to the other entries.
|
||||
@ -1269,10 +1269,10 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCObjectStreamer &streamer,
|
||||
const MCRegisterInfo *MRI = context.getRegisterInfo();
|
||||
const MCObjectFileInfo *MOFI = context.getObjectFileInfo();
|
||||
|
||||
MCSymbol *sectionStart = context.CreateTempSymbol();
|
||||
MCSymbol *sectionStart = context.createTempSymbol();
|
||||
streamer.EmitLabel(sectionStart);
|
||||
|
||||
MCSymbol *sectionEnd = context.CreateTempSymbol();
|
||||
MCSymbol *sectionEnd = context.createTempSymbol();
|
||||
|
||||
// Length
|
||||
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *sectionStart,
|
||||
@ -1380,8 +1380,8 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCObjectStreamer &streamer,
|
||||
const MCSymbol &cieStart,
|
||||
const MCDwarfFrameInfo &frame) {
|
||||
MCContext &context = streamer.getContext();
|
||||
MCSymbol *fdeStart = context.CreateTempSymbol();
|
||||
MCSymbol *fdeEnd = context.CreateTempSymbol();
|
||||
MCSymbol *fdeStart = context.createTempSymbol();
|
||||
MCSymbol *fdeEnd = context.createTempSymbol();
|
||||
const MCObjectFileInfo *MOFI = context.getObjectFileInfo();
|
||||
|
||||
CFAOffset = InitialCFAOffset;
|
||||
@ -1524,7 +1524,7 @@ void MCDwarfFrameEmitter::Emit(MCObjectStreamer &Streamer, MCAsmBackend *MAB,
|
||||
*MOFI->getDwarfFrameSection();
|
||||
|
||||
Streamer.SwitchSection(&Section);
|
||||
MCSymbol *SectionStart = Context.CreateTempSymbol();
|
||||
MCSymbol *SectionStart = Context.createTempSymbol();
|
||||
Streamer.EmitLabel(SectionStart);
|
||||
Emitter.setSectionStart(SectionStart);
|
||||
|
||||
|
@ -164,7 +164,7 @@ const MCSymbolRefExpr *MCSymbolRefExpr::Create(const MCSymbol *Sym,
|
||||
|
||||
const MCSymbolRefExpr *MCSymbolRefExpr::Create(StringRef Name, VariantKind Kind,
|
||||
MCContext &Ctx) {
|
||||
return Create(Ctx.GetOrCreateSymbol(Name), Kind, Ctx);
|
||||
return Create(Ctx.getOrCreateSymbol(Name), Kind, Ctx);
|
||||
}
|
||||
|
||||
StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
|
||||
|
@ -163,7 +163,7 @@ void MCMachOStreamer::ChangeSection(const MCSection *Section,
|
||||
// Output a linker-local symbol so we don't need section-relative local
|
||||
// relocations. The linker hates us when we do that.
|
||||
if (LabelSections && !HasSectionLabel[Section]) {
|
||||
MCSymbol *Label = getContext().CreateLinkerPrivateTempSymbol();
|
||||
MCSymbol *Label = getContext().createLinkerPrivateTempSymbol();
|
||||
EmitLabel(Label);
|
||||
HasSectionLabel[Section] = true;
|
||||
}
|
||||
@ -208,7 +208,7 @@ void MCMachOStreamer::EmitDataRegion(DataRegionData::KindTy Kind) {
|
||||
if (!getAssembler().getBackend().hasDataInCodeSupport())
|
||||
return;
|
||||
// Create a temporary label to mark the start of the data region.
|
||||
MCSymbol *Start = getContext().CreateTempSymbol();
|
||||
MCSymbol *Start = getContext().createTempSymbol();
|
||||
EmitLabel(Start);
|
||||
// Record the region for the object writer to use.
|
||||
DataRegionData Data = { Kind, Start, nullptr };
|
||||
@ -224,7 +224,7 @@ void MCMachOStreamer::EmitDataRegionEnd() {
|
||||
DataRegionData &Data = Regions.back();
|
||||
assert(!Data.End && "Mismatched .end_data_region!");
|
||||
// Create a temporary label to mark the end of the data region.
|
||||
Data.End = getContext().CreateTempSymbol();
|
||||
Data.End = getContext().createTempSymbol();
|
||||
EmitLabel(Data.End);
|
||||
}
|
||||
|
||||
|
@ -127,12 +127,12 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
|
||||
|
||||
void MCObjectStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) {
|
||||
// We need to create a local symbol to avoid relocations.
|
||||
Frame.Begin = getContext().CreateTempSymbol();
|
||||
Frame.Begin = getContext().createTempSymbol();
|
||||
EmitLabel(Frame.Begin);
|
||||
}
|
||||
|
||||
void MCObjectStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
|
||||
Frame.End = getContext().CreateTempSymbol();
|
||||
Frame.End = getContext().createTempSymbol();
|
||||
EmitLabel(Frame.End);
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ bool MCObjectStreamer::EmitValueToOffset(const MCExpr *Offset,
|
||||
return false;
|
||||
}
|
||||
|
||||
MCSymbol *CurrentPos = getContext().CreateTempSymbol();
|
||||
MCSymbol *CurrentPos = getContext().createTempSymbol();
|
||||
EmitLabel(CurrentPos);
|
||||
MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
|
||||
const MCExpr *Ref =
|
||||
|
@ -630,7 +630,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
|
||||
// If we are generating dwarf for assembly source files save the initial text
|
||||
// section and generate a .file directive.
|
||||
if (getContext().getGenDwarfForAssembly()) {
|
||||
MCSymbol *SectionStartSym = getContext().CreateTempSymbol();
|
||||
MCSymbol *SectionStartSym = getContext().createTempSymbol();
|
||||
getStreamer().EmitLabel(SectionStartSym);
|
||||
auto InsertResult = getContext().addGenDwarfSection(
|
||||
getStreamer().getCurrentSection().first);
|
||||
@ -798,7 +798,7 @@ bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
||||
if (Lexer.getMAI().getDollarIsPC()) {
|
||||
// This is a '$' reference, which references the current PC. Emit a
|
||||
// temporary label to the streamer and refer to it.
|
||||
MCSymbol *Sym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *Sym = Ctx.createTempSymbol();
|
||||
Out.EmitLabel(Sym);
|
||||
Res = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_None,
|
||||
getContext());
|
||||
@ -855,7 +855,7 @@ bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
||||
}
|
||||
}
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(SymbolName);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName);
|
||||
|
||||
// If this is an absolute variable reference, substitute it now to preserve
|
||||
// semantics in the face of reassignment.
|
||||
@ -893,7 +893,7 @@ bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
||||
}
|
||||
if (IDVal == "f" || IDVal == "b") {
|
||||
MCSymbol *Sym =
|
||||
Ctx.GetDirectionalLocalSymbol(IntVal, IDVal == "b");
|
||||
Ctx.getDirectionalLocalSymbol(IntVal, IDVal == "b");
|
||||
Res = MCSymbolRefExpr::Create(Sym, Variant, getContext());
|
||||
if (IDVal == "b" && Sym->isUndefined())
|
||||
return Error(Loc, "invalid reference to undefined symbol");
|
||||
@ -914,7 +914,7 @@ bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
||||
case AsmToken::Dot: {
|
||||
// This is a '.' reference, which references the current PC. Emit a
|
||||
// temporary label to the streamer and refer to it.
|
||||
MCSymbol *Sym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *Sym = Ctx.createTempSymbol();
|
||||
Out.EmitLabel(Sym);
|
||||
Res = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_None, getContext());
|
||||
EndLoc = Lexer.getTok().getEndLoc();
|
||||
@ -1309,9 +1309,9 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
|
||||
IDVal.size(), RewrittenLabel));
|
||||
IDVal = RewrittenLabel;
|
||||
}
|
||||
Sym = getContext().GetOrCreateSymbol(IDVal);
|
||||
Sym = getContext().getOrCreateSymbol(IDVal);
|
||||
} else
|
||||
Sym = Ctx.CreateDirectionalLocalSymbol(LocalLabelVal);
|
||||
Sym = Ctx.createDirectionalLocalSymbol(LocalLabelVal);
|
||||
|
||||
Sym->redefineIfPossible();
|
||||
|
||||
@ -2217,7 +2217,7 @@ bool AsmParser::parseAssignment(StringRef Name, bool allow_redef,
|
||||
|
||||
// Validate that the LHS is allowed to be a variable (either it has not been
|
||||
// used as a symbol, or it is an absolute symbol).
|
||||
MCSymbol *Sym = getContext().LookupSymbol(Name);
|
||||
MCSymbol *Sym = getContext().lookupSymbol(Name);
|
||||
if (Sym) {
|
||||
// Diagnose assignment to a label.
|
||||
//
|
||||
@ -2246,7 +2246,7 @@ bool AsmParser::parseAssignment(StringRef Name, bool allow_redef,
|
||||
}
|
||||
return false;
|
||||
} else
|
||||
Sym = getContext().GetOrCreateSymbol(Name);
|
||||
Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
Sym->setRedefinable(allow_redef);
|
||||
|
||||
@ -3186,7 +3186,7 @@ bool AsmParser::parseDirectiveCFIPersonalityOrLsda(bool IsPersonality) {
|
||||
if (parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (IsPersonality)
|
||||
getStreamer().EmitCFIPersonality(Sym, Encoding);
|
||||
@ -3700,7 +3700,7 @@ bool AsmParser::parseDirectiveSymbolAttribute(MCSymbolAttr Attr) {
|
||||
if (parseIdentifier(Name))
|
||||
return Error(Loc, "expected identifier in directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
// Assembler local symbols don't make any sense here. Complain loudly.
|
||||
if (Sym->isTemporary())
|
||||
@ -3733,7 +3733,7 @@ bool AsmParser::parseDirectiveComm(bool IsLocal) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// Handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in directive");
|
||||
@ -4030,7 +4030,7 @@ bool AsmParser::parseDirectiveIfdef(SMLoc DirectiveLoc, bool expect_defined) {
|
||||
|
||||
Lex();
|
||||
|
||||
MCSymbol *Sym = getContext().LookupSymbol(Name);
|
||||
MCSymbol *Sym = getContext().lookupSymbol(Name);
|
||||
|
||||
if (expect_defined)
|
||||
TheCondState.CondMet = (Sym && !Sym->isUndefined());
|
||||
|
@ -272,7 +272,7 @@ bool COFFAsmParser::ParseDirectiveSymbolAttribute(StringRef Directive, SMLoc) {
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
getStreamer().EmitSymbolAttribute(Sym, Attr);
|
||||
|
||||
@ -398,7 +398,7 @@ bool COFFAsmParser::ParseDirectiveDef(StringRef, SMLoc) {
|
||||
if (getParser().parseIdentifier(SymbolName))
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(SymbolName);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName);
|
||||
|
||||
getStreamer().BeginCOFFSymbolDef(Sym);
|
||||
|
||||
@ -446,7 +446,7 @@ bool COFFAsmParser::ParseDirectiveSecRel32(StringRef, SMLoc) {
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in directive");
|
||||
|
||||
MCSymbol *Symbol = getContext().GetOrCreateSymbol(SymbolID);
|
||||
MCSymbol *Symbol = getContext().getOrCreateSymbol(SymbolID);
|
||||
|
||||
Lex();
|
||||
getStreamer().EmitCOFFSecRel32(Symbol);
|
||||
@ -461,7 +461,7 @@ bool COFFAsmParser::ParseDirectiveSecIdx(StringRef, SMLoc) {
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in directive");
|
||||
|
||||
MCSymbol *Symbol = getContext().GetOrCreateSymbol(SymbolID);
|
||||
MCSymbol *Symbol = getContext().getOrCreateSymbol(SymbolID);
|
||||
|
||||
Lex();
|
||||
getStreamer().EmitCOFFSectionIndex(Symbol);
|
||||
@ -524,7 +524,7 @@ bool COFFAsmParser::ParseSEHDirectiveStartProc(StringRef, SMLoc) {
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in directive");
|
||||
|
||||
MCSymbol *Symbol = getContext().GetOrCreateSymbol(SymbolID);
|
||||
MCSymbol *Symbol = getContext().getOrCreateSymbol(SymbolID);
|
||||
|
||||
Lex();
|
||||
getStreamer().EmitWinCFIStartProc(Symbol);
|
||||
@ -568,7 +568,7 @@ bool COFFAsmParser::ParseSEHDirectiveHandler(StringRef, SMLoc) {
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in directive");
|
||||
|
||||
MCSymbol *handler = getContext().GetOrCreateSymbol(SymbolID);
|
||||
MCSymbol *handler = getContext().getOrCreateSymbol(SymbolID);
|
||||
|
||||
Lex();
|
||||
getStreamer().EmitWinEHHandler(handler, unwind, except);
|
||||
|
@ -407,7 +407,7 @@ bool DarwinAsmParser::parseDirectiveDesc(StringRef, SMLoc) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// Handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in '.desc' directive");
|
||||
@ -444,7 +444,7 @@ bool DarwinAsmParser::parseDirectiveIndirectSymbol(StringRef, SMLoc Loc) {
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in .indirect_symbol directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
// Assembler local symbols don't make any sense here. Complain loudly.
|
||||
if (Sym->isTemporary())
|
||||
@ -519,7 +519,7 @@ bool DarwinAsmParser::parseDirectiveLsym(StringRef, SMLoc) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// Handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in '.lsym' directive");
|
||||
@ -695,7 +695,7 @@ bool DarwinAsmParser::parseDirectiveTBSS(StringRef, SMLoc) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// Handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in directive");
|
||||
@ -778,7 +778,7 @@ bool DarwinAsmParser::parseDirectiveZerofill(StringRef, SMLoc) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(IDStr);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(IDStr);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in directive");
|
||||
|
@ -174,7 +174,7 @@ bool ELFAsmParser::ParseDirectiveSymbolAttribute(StringRef Directive, SMLoc) {
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
getStreamer().EmitSymbolAttribute(Sym, Attr);
|
||||
|
||||
@ -209,7 +209,7 @@ bool ELFAsmParser::ParseDirectiveSize(StringRef, SMLoc) {
|
||||
StringRef Name;
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma))
|
||||
return TokError("unexpected token in directive");
|
||||
@ -539,7 +539,7 @@ EndStmt:
|
||||
if (getContext().getDwarfVersion() <= 2)
|
||||
Warning(loc, "DWARF2 only supports one section per compilation unit");
|
||||
|
||||
MCSymbol *SectionStartSymbol = getContext().CreateTempSymbol();
|
||||
MCSymbol *SectionStartSymbol = getContext().createTempSymbol();
|
||||
getStreamer().EmitLabel(SectionStartSymbol);
|
||||
InsertResult.first->second.first = SectionStartSymbol;
|
||||
}
|
||||
@ -582,7 +582,7 @@ bool ELFAsmParser::ParseDirectiveType(StringRef, SMLoc) {
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
// Handle the identifier as the key symbol.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
// NOTE the comma is optional in all cases. It is only documented as being
|
||||
// optional in the first case, however, GAS will silently treat the comma as
|
||||
@ -661,8 +661,8 @@ bool ELFAsmParser::ParseDirectiveSymver(StringRef, SMLoc) {
|
||||
if (AliasName.find('@') == StringRef::npos)
|
||||
return TokError("expected a '@' in the name");
|
||||
|
||||
MCSymbol *Alias = getContext().GetOrCreateSymbol(AliasName);
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
const MCExpr *Value = MCSymbolRefExpr::Create(Sym, getContext());
|
||||
|
||||
getStreamer().EmitAssignment(Alias, Value);
|
||||
@ -711,9 +711,9 @@ bool ELFAsmParser::ParseDirectiveWeakref(StringRef, SMLoc) {
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
|
||||
MCSymbol *Alias = getContext().GetOrCreateSymbol(AliasName);
|
||||
MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName);
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
getStreamer().EmitWeakReference(Alias, Sym);
|
||||
return false;
|
||||
|
@ -146,7 +146,7 @@ void MCStreamer::EmitZeros(uint64_t NumBytes) {
|
||||
unsigned MCStreamer::EmitDwarfFileDirective(unsigned FileNo,
|
||||
StringRef Directory,
|
||||
StringRef Filename, unsigned CUID) {
|
||||
return getContext().GetDwarfFile(Directory, Filename, FileNo, CUID);
|
||||
return getContext().getDwarfFile(Directory, Filename, FileNo, CUID);
|
||||
}
|
||||
|
||||
void MCStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
||||
@ -163,7 +163,7 @@ MCSymbol *MCStreamer::getDwarfLineTableSymbol(unsigned CUID) {
|
||||
if (!Table.getLabel()) {
|
||||
StringRef Prefix = Context.getAsmInfo()->getPrivateGlobalPrefix();
|
||||
Table.setLabel(
|
||||
Context.GetOrCreateSymbol(Prefix + "line_table_start" + Twine(CUID)));
|
||||
Context.getOrCreateSymbol(Prefix + "line_table_start" + Twine(CUID)));
|
||||
}
|
||||
return Table.getLabel();
|
||||
}
|
||||
@ -252,7 +252,7 @@ void MCStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
|
||||
|
||||
MCSymbol *MCStreamer::EmitCFICommon() {
|
||||
EnsureValidDwarfFrame();
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
return Label;
|
||||
}
|
||||
@ -399,7 +399,7 @@ void MCStreamer::EmitWinCFIStartProc(const MCSymbol *Symbol) {
|
||||
if (CurrentWinFrameInfo && !CurrentWinFrameInfo->End)
|
||||
report_fatal_error("Starting a function before ending the previous one!");
|
||||
|
||||
MCSymbol *StartProc = getContext().CreateTempSymbol();
|
||||
MCSymbol *StartProc = getContext().createTempSymbol();
|
||||
EmitLabel(StartProc);
|
||||
|
||||
WinFrameInfos.push_back(new WinEH::FrameInfo(Symbol, StartProc));
|
||||
@ -411,7 +411,7 @@ void MCStreamer::EmitWinCFIEndProc() {
|
||||
if (CurrentWinFrameInfo->ChainedParent)
|
||||
report_fatal_error("Not all chained regions terminated!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
CurrentWinFrameInfo->End = Label;
|
||||
}
|
||||
@ -419,7 +419,7 @@ void MCStreamer::EmitWinCFIEndProc() {
|
||||
void MCStreamer::EmitWinCFIStartChained() {
|
||||
EnsureValidWinFrameInfo();
|
||||
|
||||
MCSymbol *StartProc = getContext().CreateTempSymbol();
|
||||
MCSymbol *StartProc = getContext().createTempSymbol();
|
||||
EmitLabel(StartProc);
|
||||
|
||||
WinFrameInfos.push_back(new WinEH::FrameInfo(CurrentWinFrameInfo->Function,
|
||||
@ -432,7 +432,7 @@ void MCStreamer::EmitWinCFIEndChained() {
|
||||
if (!CurrentWinFrameInfo->ChainedParent)
|
||||
report_fatal_error("End of a chained region outside a chained region!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
CurrentWinFrameInfo->End = Label;
|
||||
@ -463,7 +463,7 @@ void MCStreamer::EmitWinEHHandlerData() {
|
||||
void MCStreamer::EmitWinCFIPushReg(unsigned Register) {
|
||||
EnsureValidWinFrameInfo();
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst = Win64EH::Instruction::PushNonVol(Label, Register);
|
||||
@ -479,7 +479,7 @@ void MCStreamer::EmitWinCFISetFrame(unsigned Register, unsigned Offset) {
|
||||
if (Offset > 240)
|
||||
report_fatal_error("Frame offset must be less than or equal to 240!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst =
|
||||
@ -495,7 +495,7 @@ void MCStreamer::EmitWinCFIAllocStack(unsigned Size) {
|
||||
if (Size & 7)
|
||||
report_fatal_error("Misaligned stack allocation!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst = Win64EH::Instruction::Alloc(Label, Size);
|
||||
@ -507,7 +507,7 @@ void MCStreamer::EmitWinCFISaveReg(unsigned Register, unsigned Offset) {
|
||||
if (Offset & 7)
|
||||
report_fatal_error("Misaligned saved register offset!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst =
|
||||
@ -520,7 +520,7 @@ void MCStreamer::EmitWinCFISaveXMM(unsigned Register, unsigned Offset) {
|
||||
if (Offset & 0x0F)
|
||||
report_fatal_error("Misaligned saved vector register offset!");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst =
|
||||
@ -533,7 +533,7 @@ void MCStreamer::EmitWinCFIPushFrame(bool Code) {
|
||||
if (CurrentWinFrameInfo->Instructions.size() > 0)
|
||||
report_fatal_error("If present, PushMachFrame must be the first UOP");
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
WinEH::Instruction Inst = Win64EH::Instruction::PushMachFrame(Label, Code);
|
||||
@ -543,7 +543,7 @@ void MCStreamer::EmitWinCFIPushFrame(bool Code) {
|
||||
void MCStreamer::EmitWinCFIEndProlog() {
|
||||
EnsureValidWinFrameInfo();
|
||||
|
||||
MCSymbol *Label = getContext().CreateTempSymbol();
|
||||
MCSymbol *Label = getContext().createTempSymbol();
|
||||
EmitLabel(Label);
|
||||
|
||||
CurrentWinFrameInfo->PrologEnd = Label;
|
||||
|
@ -153,7 +153,7 @@ static void EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info) {
|
||||
return;
|
||||
|
||||
MCContext &context = streamer.getContext();
|
||||
MCSymbol *Label = context.CreateTempSymbol();
|
||||
MCSymbol *Label = context.createTempSymbol();
|
||||
|
||||
streamer.EmitValueToAlignment(4);
|
||||
streamer.EmitLabel(Label);
|
||||
|
@ -687,7 +687,7 @@ void WinCOFFObjectWriter::RecordRelocation(
|
||||
const MCSymbol &Symbol = Target.getSymA()->getSymbol();
|
||||
const MCSymbol &A = Symbol;
|
||||
if (!Asm.hasSymbolData(A))
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
Twine("symbol '") + A.getName() + "' can not be undefined");
|
||||
|
||||
@ -710,13 +710,13 @@ void WinCOFFObjectWriter::RecordRelocation(
|
||||
const MCSymbol *B = &SymB->getSymbol();
|
||||
const MCSymbolData &B_SD = Asm.getSymbolData(*B);
|
||||
if (!B_SD.getFragment())
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
Twine("symbol '") + B->getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
||||
if (!A_SD.getFragment())
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
Twine("symbol '") + Symbol.getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
@ -269,7 +269,7 @@ void MCWinCOFFStreamer::FinishImpl() {
|
||||
|
||||
LLVM_ATTRIBUTE_NORETURN
|
||||
void MCWinCOFFStreamer::FatalError(const Twine &Msg) const {
|
||||
getContext().FatalError(SMLoc(), Msg);
|
||||
getContext().reportFatalError(SMLoc(), Msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,11 +172,11 @@ MCSymbol *AArch64AsmPrinter::GetCPISymbol(unsigned CPID) const {
|
||||
// avoid addends on the relocation?), ELF has no such concept and
|
||||
// uses a normal private symbol.
|
||||
if (getDataLayout().getLinkerPrivateGlobalPrefix()[0])
|
||||
return OutContext.GetOrCreateSymbol(
|
||||
return OutContext.getOrCreateSymbol(
|
||||
Twine(getDataLayout().getLinkerPrivateGlobalPrefix()) + "CPI" +
|
||||
Twine(getFunctionNumber()) + "_" + Twine(CPID));
|
||||
|
||||
return OutContext.GetOrCreateSymbol(
|
||||
return OutContext.getOrCreateSymbol(
|
||||
Twine(getDataLayout().getPrivateGlobalPrefix()) + "CPI" +
|
||||
Twine(getFunctionNumber()) + "_" + Twine(CPID));
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ void AArch64FrameLowering::emitPrologue(MachineFunction &MF,
|
||||
AFI->setLocalStackSize(NumBytes);
|
||||
|
||||
// Label used to tie together the PROLOG_LABEL and the MachineMoves.
|
||||
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||
MCSymbol *FrameLabel = MMI.getContext().createTempSymbol();
|
||||
|
||||
// REDZONE: If the stack size is less than 128 bytes, we don't need
|
||||
// to actually allocate.
|
||||
|
@ -41,7 +41,7 @@ const MCExpr *AArch64_MachoTargetObjectFile::getTTypeGlobalReference(
|
||||
const MCSymbol *Sym = TM.getSymbol(GV, Mang);
|
||||
const MCExpr *Res =
|
||||
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOT, getContext());
|
||||
MCSymbol *PCSym = getContext().CreateTempSymbol();
|
||||
MCSymbol *PCSym = getContext().createTempSymbol();
|
||||
Streamer.EmitLabel(PCSym);
|
||||
const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, getContext());
|
||||
return MCBinaryExpr::CreateSub(Res, PC, getContext());
|
||||
@ -66,7 +66,7 @@ const MCExpr *AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(
|
||||
// is an indirect pc-relative reference.
|
||||
const MCExpr *Res =
|
||||
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOT, getContext());
|
||||
MCSymbol *PCSym = getContext().CreateTempSymbol();
|
||||
MCSymbol *PCSym = getContext().createTempSymbol();
|
||||
Streamer.EmitLabel(PCSym);
|
||||
const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, getContext());
|
||||
return MCBinaryExpr::CreateSub(Res, PC, getContext());
|
||||
|
@ -4104,7 +4104,7 @@ bool AArch64AsmParser::parseDirectiveTLSDescCall(SMLoc L) {
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return Error(L, "expected symbol after directive");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
const MCExpr *Expr = MCSymbolRefExpr::Create(Sym, getContext());
|
||||
Expr = AArch64MCExpr::Create(Expr, AArch64MCExpr::VK_TLSDESC, getContext());
|
||||
|
||||
@ -4153,7 +4153,7 @@ bool AArch64AsmParser::parseDirectiveLOH(StringRef IDVal, SMLoc Loc) {
|
||||
StringRef Name;
|
||||
if (getParser().parseIdentifier(Name))
|
||||
return TokError("expected identifier in directive");
|
||||
Args.push_back(getContext().GetOrCreateSymbol(Name));
|
||||
Args.push_back(getContext().getOrCreateSymbol(Name));
|
||||
|
||||
if (Idx + 1 == NbArgs)
|
||||
break;
|
||||
|
@ -165,7 +165,7 @@ bool AArch64ExternalSymbolizer::tryAddingSymbolicOperand(
|
||||
if (SymbolicOp.AddSymbol.Present) {
|
||||
if (SymbolicOp.AddSymbol.Name) {
|
||||
StringRef Name(SymbolicOp.AddSymbol.Name);
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
MCSymbolRefExpr::VariantKind Variant = getVariant(SymbolicOp.VariantKind);
|
||||
if (Variant != MCSymbolRefExpr::VK_None)
|
||||
Add = MCSymbolRefExpr::Create(Sym, Variant, Ctx);
|
||||
@ -180,7 +180,7 @@ bool AArch64ExternalSymbolizer::tryAddingSymbolicOperand(
|
||||
if (SymbolicOp.SubtractSymbol.Present) {
|
||||
if (SymbolicOp.SubtractSymbol.Name) {
|
||||
StringRef Name(SymbolicOp.SubtractSymbol.Name);
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
Sub = MCSymbolRefExpr::Create(Sym, Ctx);
|
||||
} else {
|
||||
Sub = MCConstantExpr::Create(SymbolicOp.SubtractSymbol.Value, Ctx);
|
||||
|
@ -167,10 +167,10 @@ private:
|
||||
}
|
||||
|
||||
void EmitMappingSymbol(StringRef Name) {
|
||||
MCSymbol *Start = getContext().CreateTempSymbol();
|
||||
MCSymbol *Start = getContext().createTempSymbol();
|
||||
EmitLabel(Start);
|
||||
|
||||
MCSymbol *Symbol = getContext().GetOrCreateSymbol(
|
||||
MCSymbol *Symbol = getContext().getOrCreateSymbol(
|
||||
Name + "." + Twine(MappingSymbolCounter++));
|
||||
|
||||
MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
|
||||
|
@ -63,7 +63,7 @@ const MCExpr *AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(
|
||||
MCContext &Context = Streamer.getContext();
|
||||
const MCExpr *Res =
|
||||
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOT, Context);
|
||||
MCSymbol *PCSym = Context.CreateTempSymbol();
|
||||
MCSymbol *PCSym = Context.createTempSymbol();
|
||||
Streamer.EmitLabel(PCSym);
|
||||
const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, Context);
|
||||
return MCBinaryExpr::CreateSub(Res, PC, Context);
|
||||
|
@ -92,7 +92,7 @@ bool AArch64MachObjectWriter::getAArch64FixupKindMachOInfo(
|
||||
// This encompasses the relocation for the whole 21-bit value.
|
||||
switch (Sym->getKind()) {
|
||||
default:
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"ADR/ADRP relocations must be GOT relative");
|
||||
case MCSymbolRefExpr::VK_PAGE:
|
||||
RelocType = unsigned(MachO::ARM64_RELOC_PAGE21);
|
||||
@ -172,7 +172,7 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
// assembler local symbols. If we got here, that's not what we have,
|
||||
// so complain loudly.
|
||||
if (Kind == AArch64::fixup_aarch64_pcrel_branch19) {
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"conditional branch requires assembler-local"
|
||||
" label. '" +
|
||||
Target.getSymA()->getSymbol().getName() +
|
||||
@ -183,14 +183,14 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
// 14-bit branch relocations should only target internal labels, and so
|
||||
// should never get here.
|
||||
if (Kind == AArch64::fixup_aarch64_pcrel_branch14) {
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"Invalid relocation on conditional branch!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getAArch64FixupKindMachOInfo(Fixup, Type, Target.getSymA(), Log2Size,
|
||||
Asm)) {
|
||||
Asm.getContext().FatalError(Fixup.getLoc(), "unknown AArch64 fixup kind!");
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(), "unknown AArch64 fixup kind!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
Type = MachO::ARM64_RELOC_UNSIGNED;
|
||||
|
||||
if (IsPCRel) {
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"PC relative absolute relocation!");
|
||||
|
||||
// FIXME: x86_64 sets the type to a branch reloc here. Should we do
|
||||
@ -235,12 +235,12 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
} else if (Target.getSymA()->getKind() != MCSymbolRefExpr::VK_None ||
|
||||
Target.getSymB()->getKind() != MCSymbolRefExpr::VK_None)
|
||||
// Otherwise, neither symbol can be modified.
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported relocation of modified symbol");
|
||||
|
||||
// We don't support PCrel relocations of differences.
|
||||
if (IsPCRel)
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported pc-relative relocation of "
|
||||
"difference");
|
||||
|
||||
@ -251,18 +251,18 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
// FIXME: We should probably just synthesize an external symbol and use
|
||||
// that.
|
||||
if (!A_Base)
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
"unsupported relocation of local symbol '" + A->getName() +
|
||||
"'. Must have non-local symbol earlier in section.");
|
||||
if (!B_Base)
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
"unsupported relocation of local symbol '" + B->getName() +
|
||||
"'. Must have non-local symbol earlier in section.");
|
||||
|
||||
if (A_Base == B_Base && A_Base)
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported relocation with identical base");
|
||||
|
||||
Value +=
|
||||
@ -319,7 +319,7 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
// the FixedValue?
|
||||
if (!Symbol->getVariableValue()->EvaluateAsRelocatable(Target, &Layout,
|
||||
&Fixup))
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unable to resolve variable '" +
|
||||
Symbol->getName() + "'");
|
||||
return RecordRelocation(Writer, Asm, Layout, Fragment, Fixup, Target,
|
||||
@ -347,7 +347,7 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
Layout.getSymbolOffset(&Base->getData());
|
||||
} else if (Symbol->isInSection()) {
|
||||
if (!CanUseLocalRelocation)
|
||||
Asm.getContext().FatalError(
|
||||
Asm.getContext().reportFatalError(
|
||||
Fixup.getLoc(),
|
||||
"unsupported relocation of local symbol '" + Symbol->getName() +
|
||||
"'. Must have non-local symbol earlier in section.");
|
||||
@ -371,7 +371,7 @@ void AArch64MachObjectWriter::RecordRelocation(
|
||||
return;
|
||||
}
|
||||
}
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported relocation of variable '" +
|
||||
Symbol->getName() + "'");
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ GetARMJTIPICJumpTableLabel(unsigned uid) const {
|
||||
SmallString<60> Name;
|
||||
raw_svector_ostream(Name) << DL->getPrivateGlobalPrefix() << "JTI"
|
||||
<< getFunctionNumber() << '_' << uid;
|
||||
return OutContext.GetOrCreateSymbol(Name);
|
||||
return OutContext.getOrCreateSymbol(Name);
|
||||
}
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ MCSymbol *ARMAsmPrinter::GetARMSJLJEHLabel() const {
|
||||
SmallString<60> Name;
|
||||
raw_svector_ostream(Name) << DL->getPrivateGlobalPrefix() << "SJLJEH"
|
||||
<< getFunctionNumber();
|
||||
return OutContext.GetOrCreateSymbol(Name);
|
||||
return OutContext.getOrCreateSymbol(Name);
|
||||
}
|
||||
|
||||
bool ARMAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
|
||||
@ -806,7 +806,7 @@ void ARMAsmPrinter::emitAttributes() {
|
||||
static MCSymbol *getPICLabel(const char *Prefix, unsigned FunctionNumber,
|
||||
unsigned LabelId, MCContext &Ctx) {
|
||||
|
||||
MCSymbol *Label = Ctx.GetOrCreateSymbol(Twine(Prefix)
|
||||
MCSymbol *Label = Ctx.getOrCreateSymbol(Twine(Prefix)
|
||||
+ "PC" + Twine(FunctionNumber) + "_" + Twine(LabelId));
|
||||
return Label;
|
||||
}
|
||||
@ -856,7 +856,7 @@ MCSymbol *ARMAsmPrinter::GetARMGVSymbol(const GlobalValue *GV,
|
||||
Name = "__imp_";
|
||||
getNameWithPrefix(Name, GV);
|
||||
|
||||
return OutContext.GetOrCreateSymbol(Name);
|
||||
return OutContext.getOrCreateSymbol(Name);
|
||||
} else if (Subtarget->isTargetELF()) {
|
||||
return getSymbol(GV);
|
||||
}
|
||||
@ -912,7 +912,7 @@ EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
|
||||
if (ACPV->mustAddCurrentAddress()) {
|
||||
// We want "(<expr> - .)", but MC doesn't have a concept of the '.'
|
||||
// label, so just emit a local label end reference that instead.
|
||||
MCSymbol *DotSym = OutContext.CreateTempSymbol();
|
||||
MCSymbol *DotSym = OutContext.createTempSymbol();
|
||||
OutStreamer->EmitLabel(DotSym);
|
||||
const MCExpr *DotExpr = MCSymbolRefExpr::Create(DotSym, OutContext);
|
||||
PCRelExpr = MCBinaryExpr::CreateSub(PCRelExpr, DotExpr, OutContext);
|
||||
@ -1281,7 +1281,7 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
}
|
||||
|
||||
if (!TRegSym) {
|
||||
TRegSym = OutContext.CreateTempSymbol();
|
||||
TRegSym = OutContext.createTempSymbol();
|
||||
ThumbIndirectPads.push_back(std::make_pair(TReg, TRegSym));
|
||||
}
|
||||
|
||||
|
@ -6749,7 +6749,7 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
|
||||
// Turn PC-relative expression into absolute expression.
|
||||
// Reading PC provides the start of the current instruction + 8 and
|
||||
// the transform to adr is biased by that.
|
||||
MCSymbol *Dot = getContext().CreateTempSymbol();
|
||||
MCSymbol *Dot = getContext().createTempSymbol();
|
||||
Out.EmitLabel(Dot);
|
||||
const MCExpr *OpExpr = Inst.getOperand(2).getExpr();
|
||||
const MCExpr *InstPC = MCSymbolRefExpr::Create(Dot,
|
||||
@ -8896,7 +8896,7 @@ bool ARMAsmParser::parseDirectiveThumbFunc(SMLoc L) {
|
||||
}
|
||||
|
||||
MCSymbol *Func =
|
||||
getParser().getContext().GetOrCreateSymbol(Tok.getIdentifier());
|
||||
getParser().getContext().getOrCreateSymbol(Tok.getIdentifier());
|
||||
getParser().getStreamer().EmitThumbFunc(Func);
|
||||
Parser.Lex(); // Consume the identifier token.
|
||||
return false;
|
||||
@ -9362,7 +9362,7 @@ bool ARMAsmParser::parseDirectivePersonality(SMLoc L) {
|
||||
StringRef Name(Parser.getTok().getIdentifier());
|
||||
Parser.Lex();
|
||||
|
||||
MCSymbol *PR = getParser().getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *PR = getParser().getContext().getOrCreateSymbol(Name);
|
||||
getTargetStreamer().emitPersonality(PR);
|
||||
return false;
|
||||
}
|
||||
@ -9963,7 +9963,7 @@ bool ARMAsmParser::parseDirectiveThumbSet(SMLoc L) {
|
||||
}
|
||||
Lex();
|
||||
|
||||
MCSymbol *Alias = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Alias = getContext().getOrCreateSymbol(Name);
|
||||
getTargetStreamer().emitThumbSet(Alias, Value);
|
||||
return false;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
isAdd = false;
|
||||
}
|
||||
if (Ctx && Value >= 4096)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Value |= isAdd << 23;
|
||||
|
||||
// Same addressing mode as fixup_arm_pcrel_10,
|
||||
@ -394,7 +394,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
opc = 2; // 0b0010
|
||||
}
|
||||
if (Ctx && ARM_AM::getSOImmVal(Value) == -1)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
// Encode the immediate and shift the opcode into place.
|
||||
return ARM_AM::getSOImmVal(Value) | (opc << 21);
|
||||
}
|
||||
@ -543,7 +543,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
}
|
||||
// The value has the low 4 bits encoded in [3:0] and the high 4 in [11:8].
|
||||
if (Ctx && Value >= 256)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Value = (Value & 0xf) | ((Value & 0xf0) << 4);
|
||||
return Value | (isAdd << 23);
|
||||
}
|
||||
@ -562,7 +562,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
// These values don't encode the low two bits since they're always zero.
|
||||
Value >>= 2;
|
||||
if (Ctx && Value >= 256)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range pc-relative fixup value");
|
||||
Value |= isAdd << 23;
|
||||
|
||||
// Same addressing mode as fixup_arm_pcrel_10, but with 16-bit halfwords
|
||||
|
@ -508,7 +508,7 @@ public:
|
||||
const SMLoc &Loc) override {
|
||||
if (const MCSymbolRefExpr *SRE = dyn_cast_or_null<MCSymbolRefExpr>(Value))
|
||||
if (SRE->getKind() == MCSymbolRefExpr::VK_ARM_SBREL && !(Size == 4))
|
||||
getContext().FatalError(Loc, "relocated expression must be 32-bit");
|
||||
getContext().reportFatalError(Loc, "relocated expression must be 32-bit");
|
||||
|
||||
EmitDataMappingSymbol();
|
||||
MCELFStreamer::EmitValueImpl(Value, Size);
|
||||
@ -560,11 +560,11 @@ private:
|
||||
}
|
||||
|
||||
void EmitMappingSymbol(StringRef Name) {
|
||||
MCSymbol *Start = getContext().CreateTempSymbol();
|
||||
MCSymbol *Start = getContext().createTempSymbol();
|
||||
EmitLabel(Start);
|
||||
|
||||
MCSymbol *Symbol =
|
||||
getContext().GetOrCreateSymbol(Name + "." +
|
||||
getContext().getOrCreateSymbol(Name + "." +
|
||||
Twine(MappingSymbolCounter++));
|
||||
|
||||
MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
|
||||
@ -1078,7 +1078,7 @@ void ARMELFStreamer::Reset() {
|
||||
|
||||
void ARMELFStreamer::emitFnStart() {
|
||||
assert(FnStart == nullptr);
|
||||
FnStart = getContext().CreateTempSymbol();
|
||||
FnStart = getContext().createTempSymbol();
|
||||
EmitLabel(FnStart);
|
||||
}
|
||||
|
||||
@ -1137,7 +1137,7 @@ void ARMELFStreamer::emitCantUnwind() { CantUnwind = true; }
|
||||
|
||||
// Add the R_ARM_NONE fixup at the same position
|
||||
void ARMELFStreamer::EmitPersonalityFixup(StringRef Name) {
|
||||
const MCSymbol *PersonalitySym = getContext().GetOrCreateSymbol(Name);
|
||||
const MCSymbol *PersonalitySym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
const MCSymbolRefExpr *PersonalityRef = MCSymbolRefExpr::Create(
|
||||
PersonalitySym, MCSymbolRefExpr::VK_ARM_NONE, getContext());
|
||||
@ -1181,7 +1181,7 @@ void ARMELFStreamer::FlushUnwindOpcodes(bool NoHandlerData) {
|
||||
|
||||
// Create .ARM.extab label for offset in .ARM.exidx
|
||||
assert(!ExTab);
|
||||
ExTab = getContext().CreateTempSymbol();
|
||||
ExTab = getContext().createTempSymbol();
|
||||
EmitLabel(ExTab);
|
||||
|
||||
// Emit personality
|
||||
|
@ -155,7 +155,7 @@ RecordARMScatteredHalfRelocation(MachObjectWriter *Writer,
|
||||
const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
|
||||
|
||||
if (!A_SD->getFragment())
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"symbol '" + A->getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
||||
@ -169,7 +169,7 @@ RecordARMScatteredHalfRelocation(MachObjectWriter *Writer,
|
||||
const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
|
||||
|
||||
if (!B_SD->getFragment())
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"symbol '" + B->getSymbol().getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
||||
@ -258,7 +258,7 @@ void ARMMachObjectWriter::RecordARMScatteredRelocation(MachObjectWriter *Writer,
|
||||
const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
|
||||
|
||||
if (!A_SD->getFragment())
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"symbol '" + A->getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
||||
@ -272,7 +272,7 @@ void ARMMachObjectWriter::RecordARMScatteredRelocation(MachObjectWriter *Writer,
|
||||
const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
|
||||
|
||||
if (!B_SD->getFragment())
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"symbol '" + B->getSymbol().getName() +
|
||||
"' can not be undefined in a subtraction expression");
|
||||
|
||||
@ -359,7 +359,7 @@ void ARMMachObjectWriter::RecordRelocation(MachObjectWriter *Writer,
|
||||
// relocation type for the fixup kind. This happens when it's a fixup that's
|
||||
// expected to always be resolvable at assembly time and not have any
|
||||
// relocations needed.
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported relocation on symbol");
|
||||
|
||||
// If this is a difference or a defined symbol plus an offset, then we need a
|
||||
|
@ -472,7 +472,7 @@ void HexagonFrameLowering::insertPrologueInBlock(MachineBasicBlock &MBB) const {
|
||||
|
||||
if (needsFrameMoves) {
|
||||
std::vector<MCCFIInstruction> Instructions = MMI.getFrameInstructions();
|
||||
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||
MCSymbol *FrameLabel = MMI.getContext().createTempSymbol();
|
||||
|
||||
// Advance CFA. DW_CFA_def_cfa
|
||||
unsigned DwFPReg = HRI.getDwarfRegNum(HRI.getFrameRegister(), true);
|
||||
|
@ -62,7 +62,7 @@ GetJumpTableSymbol(const MachineOperand &MO) const {
|
||||
}
|
||||
|
||||
// Create a symbol for the name.
|
||||
return Ctx.GetOrCreateSymbol(Name);
|
||||
return Ctx.getOrCreateSymbol(Name);
|
||||
}
|
||||
|
||||
MCSymbol *MSP430MCInstLower::
|
||||
@ -79,7 +79,7 @@ GetConstantPoolIndexSymbol(const MachineOperand &MO) const {
|
||||
}
|
||||
|
||||
// Create a symbol for the name.
|
||||
return Ctx.GetOrCreateSymbol(Name);
|
||||
return Ctx.getOrCreateSymbol(Name);
|
||||
}
|
||||
|
||||
MCSymbol *MSP430MCInstLower::
|
||||
|
@ -2495,7 +2495,7 @@ bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) {
|
||||
return true;
|
||||
|
||||
SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol("$" + Identifier);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol("$" + Identifier);
|
||||
// Otherwise create a symbol reference.
|
||||
const MCExpr *Res =
|
||||
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_None, getContext());
|
||||
@ -2796,7 +2796,7 @@ MipsAsmParser::parseMemOperand(OperandVector &Operands) {
|
||||
|
||||
bool MipsAsmParser::searchSymbolAlias(OperandVector &Operands) {
|
||||
MCAsmParser &Parser = getParser();
|
||||
MCSymbol *Sym = getContext().LookupSymbol(Parser.getTok().getIdentifier());
|
||||
MCSymbol *Sym = getContext().lookupSymbol(Parser.getTok().getIdentifier());
|
||||
if (Sym) {
|
||||
SMLoc S = Parser.getTok().getLoc();
|
||||
const MCExpr *Expr;
|
||||
@ -3629,7 +3629,7 @@ bool MipsAsmParser::parseSetAssignment() {
|
||||
if (Parser.parseExpression(Value))
|
||||
return reportParseError("expected valid expression after comma");
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
Sym->setVariableValue(Value);
|
||||
|
||||
return false;
|
||||
@ -4291,7 +4291,7 @@ bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(SymbolName);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName);
|
||||
|
||||
getTargetStreamer().emitDirectiveEnt(*Sym);
|
||||
CurrentFn = Sym;
|
||||
|
@ -68,14 +68,14 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t)Value / 4;
|
||||
// We now check if Value can be encoded as a 16-bit signed immediate.
|
||||
if (!isIntN(16, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC16 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC16 fixup");
|
||||
break;
|
||||
case Mips::fixup_MIPS_PC19_S2:
|
||||
// Forcing a signed division because Value can be negative.
|
||||
Value = (int64_t)Value / 4;
|
||||
// We now check if Value can be encoded as a 19-bit signed immediate.
|
||||
if (!isIntN(19, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC19 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC19 fixup");
|
||||
break;
|
||||
case Mips::fixup_Mips_26:
|
||||
// So far we are only using this type for jumps.
|
||||
@ -109,7 +109,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t) Value / 2;
|
||||
// We now check if Value can be encoded as a 7-bit signed immediate.
|
||||
if (!isIntN(7, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC7 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC7 fixup");
|
||||
break;
|
||||
case Mips::fixup_MICROMIPS_PC10_S1:
|
||||
Value -= 2;
|
||||
@ -117,7 +117,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t) Value / 2;
|
||||
// We now check if Value can be encoded as a 10-bit signed immediate.
|
||||
if (!isIntN(10, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC10 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC10 fixup");
|
||||
break;
|
||||
case Mips::fixup_MICROMIPS_PC16_S1:
|
||||
Value -= 4;
|
||||
@ -125,14 +125,14 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t)Value / 2;
|
||||
// We now check if Value can be encoded as a 16-bit signed immediate.
|
||||
if (!isIntN(16, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC16 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC16 fixup");
|
||||
break;
|
||||
case Mips::fixup_MIPS_PC18_S3:
|
||||
// Forcing a signed division because Value can be negative.
|
||||
Value = (int64_t)Value / 8;
|
||||
// We now check if Value can be encoded as a 18-bit signed immediate.
|
||||
if (!isIntN(18, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC18 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC18 fixup");
|
||||
break;
|
||||
case Mips::fixup_MIPS_PC21_S2:
|
||||
Value -= 4;
|
||||
@ -140,7 +140,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t) Value / 4;
|
||||
// We now check if Value can be encoded as a 21-bit signed immediate.
|
||||
if (!isIntN(21, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC21 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC21 fixup");
|
||||
break;
|
||||
case Mips::fixup_MIPS_PC26_S2:
|
||||
Value -= 4;
|
||||
@ -148,7 +148,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
Value = (int64_t) Value / 4;
|
||||
// We now check if Value can be encoded as a 26-bit signed immediate.
|
||||
if (!isIntN(26, Value) && Ctx)
|
||||
Ctx->FatalError(Fixup.getLoc(), "out of range PC26 fixup");
|
||||
Ctx->reportFatalError(Fixup.getLoc(), "out of range PC26 fixup");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -692,7 +692,7 @@ void MipsTargetELFStreamer::emitDirectiveCpLoad(unsigned RegNo) {
|
||||
|
||||
StringRef SymName("_gp_disp");
|
||||
MCAssembler &MCA = getStreamer().getAssembler();
|
||||
MCSymbol *GP_Disp = MCA.getContext().GetOrCreateSymbol(SymName);
|
||||
MCSymbol *GP_Disp = MCA.getContext().getOrCreateSymbol(SymName);
|
||||
MCA.getOrCreateSymbolData(*GP_Disp);
|
||||
|
||||
MCInst TmpInst;
|
||||
|
@ -893,7 +893,7 @@ void MipsAsmPrinter::EmitSwapFPIntRetval(
|
||||
|
||||
void MipsAsmPrinter::EmitFPCallStub(
|
||||
const char *Symbol, const Mips16HardFloatInfo::FuncSignature *Signature) {
|
||||
MCSymbol *MSymbol = OutContext.GetOrCreateSymbol(StringRef(Symbol));
|
||||
MCSymbol *MSymbol = OutContext.getOrCreateSymbol(StringRef(Symbol));
|
||||
using namespace Mips16HardFloatInfo;
|
||||
bool LE = getDataLayout().isLittleEndian();
|
||||
// Construct a local MCSubtargetInfo here.
|
||||
@ -984,10 +984,10 @@ void MipsAsmPrinter::EmitFPCallStub(
|
||||
// __call_stub_fp_xxxx:
|
||||
//
|
||||
std::string x = "__call_stub_fp_" + std::string(Symbol);
|
||||
MCSymbol *Stub = OutContext.GetOrCreateSymbol(StringRef(x));
|
||||
MCSymbol *Stub = OutContext.getOrCreateSymbol(StringRef(x));
|
||||
TS.emitDirectiveEnt(*Stub);
|
||||
MCSymbol *MType =
|
||||
OutContext.GetOrCreateSymbol("__call_stub_fp_" + Twine(Symbol));
|
||||
OutContext.getOrCreateSymbol("__call_stub_fp_" + Twine(Symbol));
|
||||
OutStreamer->EmitSymbolAttribute(MType, MCSA_ELF_TypeFunction);
|
||||
OutStreamer->EmitLabel(Stub);
|
||||
|
||||
@ -1027,7 +1027,7 @@ void MipsAsmPrinter::EmitFPCallStub(
|
||||
// else
|
||||
EmitInstrReg(*STI, Mips::JR, Mips::S2);
|
||||
|
||||
MCSymbol *Tmp = OutContext.CreateTempSymbol();
|
||||
MCSymbol *Tmp = OutContext.createTempSymbol();
|
||||
OutStreamer->EmitLabel(Tmp);
|
||||
const MCSymbolRefExpr *E = MCSymbolRefExpr::Create(Stub, OutContext);
|
||||
const MCSymbolRefExpr *T = MCSymbolRefExpr::Create(Tmp, OutContext);
|
||||
|
@ -225,7 +225,7 @@ void NVPTXAsmPrinter::lowerImageHandleSymbol(unsigned Index, MCOperand &MCOp) {
|
||||
const char *Sym = MFI->getImageHandleSymbol(Index);
|
||||
std::string *SymNamePtr =
|
||||
nvTM.getManagedStrPool()->getManagedString(Sym);
|
||||
MCOp = GetSymbolRef(OutContext.GetOrCreateSymbol(
|
||||
MCOp = GetSymbolRef(OutContext.getOrCreateSymbol(
|
||||
StringRef(SymNamePtr->c_str())));
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ void NVPTXAsmPrinter::lowerToMCInst(const MachineInstr *MI, MCInst &OutMI) {
|
||||
if (MI->getOpcode() == NVPTX::CALL_PROTOTYPE) {
|
||||
const MachineOperand &MO = MI->getOperand(0);
|
||||
OutMI.addOperand(GetSymbolRef(
|
||||
OutContext.GetOrCreateSymbol(Twine(MO.getSymbolName()))));
|
||||
OutContext.getOrCreateSymbol(Twine(MO.getSymbolName()))));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1861,7 +1861,7 @@ bool PPCAsmParser::ParseDirectiveLocalEntry(SMLoc L) {
|
||||
Error(L, "expected identifier in directive");
|
||||
return false;
|
||||
}
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
|
||||
if (getLexer().isNot(AsmToken::Comma)) {
|
||||
Error(L, "unexpected token in directive");
|
||||
|
@ -244,7 +244,7 @@ bool PPCMachObjectWriter::RecordScatteredRelocation(
|
||||
if (FixupOffset > 0xffffff) {
|
||||
char Buffer[32];
|
||||
format("0x%x", FixupOffset).print(Buffer, sizeof(Buffer));
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
Twine("Section too large, can't encode "
|
||||
"r_address (") +
|
||||
Buffer + ") into 24 bits of scattered "
|
||||
|
@ -406,7 +406,7 @@ void PPCAsmPrinter::LowerPATCHPOINT(MCStreamer &OutStreamer, StackMaps &SM,
|
||||
void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
|
||||
MCSymbolRefExpr::VariantKind VK) {
|
||||
StringRef Name = "__tls_get_addr";
|
||||
MCSymbol *TlsGetAddr = OutContext.GetOrCreateSymbol(Name);
|
||||
MCSymbol *TlsGetAddr = OutContext.getOrCreateSymbol(Name);
|
||||
MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None;
|
||||
|
||||
assert(MI->getOperand(0).isReg() &&
|
||||
@ -462,7 +462,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
// blrl
|
||||
// This will return the pointer to _GLOBAL_OFFSET_TABLE_@local
|
||||
MCSymbol *GOTSymbol =
|
||||
OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
OutContext.getOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
const MCExpr *OffsExpr =
|
||||
MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(GOTSymbol,
|
||||
MCSymbolRefExpr::VK_PPC_LOCAL,
|
||||
@ -557,7 +557,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_None,
|
||||
OutContext);
|
||||
const MCExpr *PB =
|
||||
MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".LTOC")),
|
||||
MCSymbolRefExpr::Create(OutContext.getOrCreateSymbol(Twine(".LTOC")),
|
||||
OutContext);
|
||||
Exp = MCBinaryExpr::CreateSub(Exp, PB, OutContext);
|
||||
TmpInst.getOperand(1) = MCOperand::createExpr(Exp);
|
||||
@ -756,9 +756,9 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
}
|
||||
|
||||
case PPC::PPC32PICGOT: {
|
||||
MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
MCSymbol *GOTRef = OutContext.CreateTempSymbol();
|
||||
MCSymbol *NextInstr = OutContext.CreateTempSymbol();
|
||||
MCSymbol *GOTSymbol = OutContext.getOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
MCSymbol *GOTRef = OutContext.createTempSymbol();
|
||||
MCSymbol *NextInstr = OutContext.createTempSymbol();
|
||||
|
||||
EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::BL)
|
||||
// FIXME: We would like an efficient form for this, so we don't have to do
|
||||
@ -784,7 +784,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
return;
|
||||
}
|
||||
case PPC::PPC32GOT: {
|
||||
MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
MCSymbol *GOTSymbol = OutContext.getOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_"));
|
||||
const MCExpr *SymGotTlsL =
|
||||
MCSymbolRefExpr::Create(GOTSymbol, MCSymbolRefExpr::VK_PPC_LO,
|
||||
OutContext);
|
||||
@ -1004,8 +1004,8 @@ void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
OutStreamer->SwitchSection(OutContext.getELFSection(
|
||||
".got2", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC));
|
||||
|
||||
MCSymbol *TOCSym = OutContext.GetOrCreateSymbol(Twine(".LTOC"));
|
||||
MCSymbol *CurrentPos = OutContext.CreateTempSymbol();
|
||||
MCSymbol *TOCSym = OutContext.getOrCreateSymbol(Twine(".LTOC"));
|
||||
MCSymbol *CurrentPos = OutContext.createTempSymbol();
|
||||
|
||||
OutStreamer->EmitLabel(CurrentPos);
|
||||
|
||||
@ -1037,7 +1037,7 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
|
||||
|
||||
const MCExpr *OffsExpr =
|
||||
MCBinaryExpr::CreateSub(
|
||||
MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".LTOC")),
|
||||
MCSymbolRefExpr::Create(OutContext.getOrCreateSymbol(Twine(".LTOC")),
|
||||
OutContext),
|
||||
MCSymbolRefExpr::Create(PICBase, OutContext),
|
||||
OutContext);
|
||||
@ -1064,7 +1064,7 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
|
||||
// entry point.
|
||||
OutStreamer->EmitValue(MCSymbolRefExpr::Create(Symbol1, OutContext),
|
||||
8 /*size*/);
|
||||
MCSymbol *Symbol2 = OutContext.GetOrCreateSymbol(StringRef(".TOC."));
|
||||
MCSymbol *Symbol2 = OutContext.getOrCreateSymbol(StringRef(".TOC."));
|
||||
// Generates a R_PPC64_TOC relocation for TOC base insertion.
|
||||
OutStreamer->EmitValue(
|
||||
MCSymbolRefExpr::Create(Symbol2, MCSymbolRefExpr::VK_PPC_TOCBASE, OutContext),
|
||||
@ -1130,12 +1130,12 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
|
||||
// Only do all that if the function uses r2 in the first place.
|
||||
&& !MF->getRegInfo().use_empty(PPC::X2)) {
|
||||
|
||||
MCSymbol *GlobalEntryLabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *GlobalEntryLabel = OutContext.createTempSymbol();
|
||||
OutStreamer->EmitLabel(GlobalEntryLabel);
|
||||
const MCSymbolRefExpr *GlobalEntryLabelExp =
|
||||
MCSymbolRefExpr::Create(GlobalEntryLabel, OutContext);
|
||||
|
||||
MCSymbol *TOCSymbol = OutContext.GetOrCreateSymbol(StringRef(".TOC."));
|
||||
MCSymbol *TOCSymbol = OutContext.getOrCreateSymbol(StringRef(".TOC."));
|
||||
const MCExpr *TOCDeltaExpr =
|
||||
MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(TOCSymbol, OutContext),
|
||||
GlobalEntryLabelExp, OutContext);
|
||||
@ -1154,7 +1154,7 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
|
||||
.addReg(PPC::X2)
|
||||
.addExpr(TOCDeltaLo));
|
||||
|
||||
MCSymbol *LocalEntryLabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *LocalEntryLabel = OutContext.createTempSymbol();
|
||||
OutStreamer->EmitLabel(LocalEntryLabel);
|
||||
const MCSymbolRefExpr *LocalEntryLabelExp =
|
||||
MCSymbolRefExpr::Create(LocalEntryLabel, OutContext);
|
||||
@ -1259,12 +1259,12 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
static MCSymbol *GetLazyPtr(MCSymbol *Sym, MCContext &Ctx) {
|
||||
// Remove $stub suffix, add $lazy_ptr.
|
||||
StringRef NoStub = Sym->getName().substr(0, Sym->getName().size()-5);
|
||||
return Ctx.GetOrCreateSymbol(NoStub + "$lazy_ptr");
|
||||
return Ctx.getOrCreateSymbol(NoStub + "$lazy_ptr");
|
||||
}
|
||||
|
||||
static MCSymbol *GetAnonSym(MCSymbol *Sym, MCContext &Ctx) {
|
||||
// Add $tmp suffix to $stub, yielding $stub$tmp.
|
||||
return Ctx.GetOrCreateSymbol(Sym->getName() + "$tmp");
|
||||
return Ctx.getOrCreateSymbol(Sym->getName() + "$tmp");
|
||||
}
|
||||
|
||||
void PPCDarwinAsmPrinter::
|
||||
@ -1344,7 +1344,7 @@ EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs) {
|
||||
OutStreamer->EmitSymbolAttribute(RawSym, MCSA_IndirectSymbol);
|
||||
|
||||
MCSymbol *DyldStubBindingHelper =
|
||||
OutContext.GetOrCreateSymbol(StringRef("dyld_stub_binding_helper"));
|
||||
OutContext.getOrCreateSymbol(StringRef("dyld_stub_binding_helper"));
|
||||
if (isPPC64) {
|
||||
// .quad dyld_stub_binding_helper
|
||||
OutStreamer->EmitSymbolValue(DyldStubBindingHelper, 8);
|
||||
@ -1399,7 +1399,7 @@ EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs) {
|
||||
OutStreamer->EmitSymbolAttribute(RawSym, MCSA_IndirectSymbol);
|
||||
|
||||
MCSymbol *DyldStubBindingHelper =
|
||||
OutContext.GetOrCreateSymbol(StringRef("dyld_stub_binding_helper"));
|
||||
OutContext.getOrCreateSymbol(StringRef("dyld_stub_binding_helper"));
|
||||
if (isPPC64) {
|
||||
// .quad dyld_stub_binding_helper
|
||||
OutStreamer->EmitSymbolValue(DyldStubBindingHelper, 8);
|
||||
|
@ -66,7 +66,7 @@ static MCSymbol *GetSymbolFromOperand(const MachineOperand &MO, AsmPrinter &AP){
|
||||
unsigned OrigLen = Name.size() - PrefixLen;
|
||||
|
||||
Name += Suffix;
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
StringRef OrigName = StringRef(Name).substr(PrefixLen, OrigLen);
|
||||
|
||||
// If the target flags on the operand changes the name of the symbol, do that
|
||||
@ -85,7 +85,7 @@ static MCSymbol *GetSymbolFromOperand(const MachineOperand &MO, AsmPrinter &AP){
|
||||
} else {
|
||||
StubSym =
|
||||
MachineModuleInfoImpl::
|
||||
StubValueTy(Ctx.GetOrCreateSymbol(OrigName), false);
|
||||
StubValueTy(Ctx.getOrCreateSymbol(OrigName), false);
|
||||
}
|
||||
return Sym;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ void PPCFunctionInfo::anchor() { }
|
||||
|
||||
MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
|
||||
const DataLayout *DL = MF.getTarget().getDataLayout();
|
||||
return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix()) +
|
||||
return MF.getContext().getOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix()) +
|
||||
Twine(MF.getFunctionNumber()) +
|
||||
"$poff");
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void AMDGPUAsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
const TargetLoweringObjectFile &TLOF = getObjFileLowering();
|
||||
OutStreamer->SwitchSection(TLOF.getTextSection());
|
||||
MCSymbol *EndOfTextLabel =
|
||||
OutContext.GetOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
OutContext.getOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
OutStreamer->EmitLabel(EndOfTextLabel);
|
||||
}
|
||||
|
||||
|
@ -69,19 +69,19 @@ void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const {
|
||||
break;
|
||||
case MachineOperand::MO_GlobalAddress: {
|
||||
const GlobalValue *GV = MO.getGlobal();
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(StringRef(GV->getName()));
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(StringRef(GV->getName()));
|
||||
MCOp = MCOperand::createExpr(MCSymbolRefExpr::Create(Sym, Ctx));
|
||||
break;
|
||||
}
|
||||
case MachineOperand::MO_TargetIndex: {
|
||||
assert(MO.getIndex() == AMDGPU::TI_CONSTDATA_START);
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
const MCSymbolRefExpr *Expr = MCSymbolRefExpr::Create(Sym, Ctx);
|
||||
MCOp = MCOperand::createExpr(Expr);
|
||||
break;
|
||||
}
|
||||
case MachineOperand::MO_ExternalSymbol: {
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(StringRef(MO.getSymbolName()));
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(StringRef(MO.getSymbolName()));
|
||||
const MCSymbolRefExpr *Expr = MCSymbolRefExpr::Create(Sym, Ctx);
|
||||
MCOp = MCOperand::createExpr(Expr);
|
||||
break;
|
||||
|
@ -1084,7 +1084,7 @@ AMDGPUAsmParser::parseSOppBrTarget(OperandVector &Operands) {
|
||||
|
||||
case AsmToken::Identifier:
|
||||
Operands.push_back(AMDGPUOperand::CreateExpr(
|
||||
MCSymbolRefExpr::Create(getContext().GetOrCreateSymbol(
|
||||
MCSymbolRefExpr::Create(getContext().getOrCreateSymbol(
|
||||
Parser.getTok().getString()), getContext()), S));
|
||||
Parser.Lex();
|
||||
return MatchOperand_Success;
|
||||
|
@ -252,7 +252,7 @@ uint64_t SIMCCodeEmitter::getMachineOpValue(const MCInst &MI,
|
||||
const MCSymbolRefExpr *Expr = cast<MCSymbolRefExpr>(MO.getExpr());
|
||||
MCFixupKind Kind;
|
||||
const MCSymbol *Sym =
|
||||
Ctx.GetOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
Ctx.getOrCreateSymbol(StringRef(END_OF_TEXT_LABEL_NAME));
|
||||
|
||||
if (&Expr->getSymbol() == Sym) {
|
||||
// Add the offset to the beginning of the constant values.
|
||||
|
@ -772,7 +772,7 @@ SparcAsmParser::parseSparcAsmOperand(std::unique_ptr<SparcOperand> &Op,
|
||||
StringRef Identifier;
|
||||
if (!getParser().parseIdentifier(Identifier)) {
|
||||
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Identifier);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier);
|
||||
|
||||
const MCExpr *Res = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_None,
|
||||
getContext());
|
||||
|
@ -176,7 +176,7 @@ void SparcAsmPrinter::LowerGETPCXAndEmitMCInsts(const MachineInstr *MI,
|
||||
const MCSubtargetInfo &STI)
|
||||
{
|
||||
MCSymbol *GOTLabel =
|
||||
OutContext.GetOrCreateSymbol(Twine("_GLOBAL_OFFSET_TABLE_"));
|
||||
OutContext.getOrCreateSymbol(Twine("_GLOBAL_OFFSET_TABLE_"));
|
||||
|
||||
const MachineOperand &MO = MI->getOperand(0);
|
||||
assert(MO.getReg() != SP::O7 &&
|
||||
@ -225,9 +225,9 @@ void SparcAsmPrinter::LowerGETPCXAndEmitMCInsts(const MachineInstr *MI,
|
||||
return;
|
||||
}
|
||||
|
||||
MCSymbol *StartLabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *EndLabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *SethiLabel = OutContext.CreateTempSymbol();
|
||||
MCSymbol *StartLabel = OutContext.createTempSymbol();
|
||||
MCSymbol *EndLabel = OutContext.createTempSymbol();
|
||||
MCSymbol *SethiLabel = OutContext.createTempSymbol();
|
||||
|
||||
MCOperand RegO7 = MCOperand::createReg(SP::O7);
|
||||
|
||||
|
@ -863,7 +863,7 @@ SystemZAsmParser::parsePCRel(OperandVector &Operands, int64_t MinVal,
|
||||
Error(StartLoc, "offset out of range");
|
||||
return MatchOperand_ParseFail;
|
||||
}
|
||||
MCSymbol *Sym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *Sym = Ctx.createTempSymbol();
|
||||
Out.EmitLabel(Sym);
|
||||
const MCExpr *Base = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_None,
|
||||
Ctx);
|
||||
@ -904,7 +904,7 @@ SystemZAsmParser::parsePCRel(OperandVector &Operands, int64_t MinVal,
|
||||
}
|
||||
|
||||
StringRef Identifier = Parser.getTok().getString();
|
||||
Sym = MCSymbolRefExpr::Create(Ctx.GetOrCreateSymbol(Identifier),
|
||||
Sym = MCSymbolRefExpr::Create(Ctx.getOrCreateSymbol(Identifier),
|
||||
Kind, Ctx);
|
||||
Parser.Lex();
|
||||
}
|
||||
|
@ -68,14 +68,14 @@ static MCInst lowerRIEfLow(const MachineInstr *MI, unsigned Opcode) {
|
||||
|
||||
static const MCSymbolRefExpr *getTLSGetOffset(MCContext &Context) {
|
||||
StringRef Name = "__tls_get_offset";
|
||||
return MCSymbolRefExpr::Create(Context.GetOrCreateSymbol(Name),
|
||||
return MCSymbolRefExpr::Create(Context.getOrCreateSymbol(Name),
|
||||
MCSymbolRefExpr::VK_PLT,
|
||||
Context);
|
||||
}
|
||||
|
||||
static const MCSymbolRefExpr *getGlobalOffsetTable(MCContext &Context) {
|
||||
StringRef Name = "_GLOBAL_OFFSET_TABLE_";
|
||||
return MCSymbolRefExpr::Create(Context.GetOrCreateSymbol(Name),
|
||||
return MCSymbolRefExpr::Create(Context.getOrCreateSymbol(Name),
|
||||
MCSymbolRefExpr::VK_None,
|
||||
Context);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ MCSymbol *TargetLoweringObjectFile::getSymbolWithGlobalValueBase(
|
||||
NameStr += DL->getPrivateGlobalPrefix();
|
||||
TM.getNameWithPrefix(NameStr, GV, Mang);
|
||||
NameStr.append(Suffix.begin(), Suffix.end());
|
||||
return Ctx->GetOrCreateSymbol(NameStr);
|
||||
return Ctx->getOrCreateSymbol(NameStr);
|
||||
}
|
||||
|
||||
MCSymbol *TargetLoweringObjectFile::getCFIPersonalitySymbol(
|
||||
@ -330,7 +330,7 @@ getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding,
|
||||
case dwarf::DW_EH_PE_pcrel: {
|
||||
// Emit a label to the streamer for the current position. This gives us
|
||||
// .-foo addressing.
|
||||
MCSymbol *PCSym = getContext().CreateTempSymbol();
|
||||
MCSymbol *PCSym = getContext().createTempSymbol();
|
||||
Streamer.EmitLabel(PCSym);
|
||||
const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, getContext());
|
||||
return MCBinaryExpr::CreateSub(Sym, PC, getContext());
|
||||
|
@ -189,5 +189,5 @@ MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV, Mangler &Mang) const {
|
||||
SmallString<60> NameStr;
|
||||
getNameWithPrefix(NameStr, GV, Mang);
|
||||
const TargetLoweringObjectFile *TLOF = getObjFileLowering();
|
||||
return TLOF->getContext().GetOrCreateSymbol(NameStr);
|
||||
return TLOF->getContext().getOrCreateSymbol(NameStr);
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ private:
|
||||
Out, MCInstBuilder(X86::PUSH32r).addReg(RegCtx.AddressReg(MVT::i32)));
|
||||
|
||||
const std::string &Fn = FuncName(AccessSize, IsWrite);
|
||||
MCSymbol *FnSym = Ctx.GetOrCreateSymbol(StringRef(Fn));
|
||||
MCSymbol *FnSym = Ctx.getOrCreateSymbol(StringRef(Fn));
|
||||
const MCSymbolRefExpr *FnExpr =
|
||||
MCSymbolRefExpr::Create(FnSym, MCSymbolRefExpr::VK_PLT, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::CALLpcrel32).addExpr(FnExpr));
|
||||
@ -653,7 +653,7 @@ void X86AddressSanitizer32::InstrumentMemOperandSmall(
|
||||
|
||||
EmitInstruction(
|
||||
Out, MCInstBuilder(X86::TEST8rr).addReg(ShadowRegI8).addReg(ShadowRegI8));
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::JE_1).addExpr(DoneExpr));
|
||||
|
||||
@ -728,7 +728,7 @@ void X86AddressSanitizer32::InstrumentMemOperandLarge(
|
||||
Inst.addOperand(MCOperand::createImm(0));
|
||||
EmitInstruction(Out, Inst);
|
||||
}
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::JE_1).addExpr(DoneExpr));
|
||||
|
||||
@ -742,7 +742,7 @@ void X86AddressSanitizer32::InstrumentMOVSImpl(unsigned AccessSize,
|
||||
StoreFlags(Out);
|
||||
|
||||
// No need to test when ECX is equals to zero.
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(
|
||||
Out, MCInstBuilder(X86::TEST32rr).addReg(X86::ECX).addReg(X86::ECX));
|
||||
@ -883,7 +883,7 @@ private:
|
||||
RegCtx.AddressReg(MVT::i64)));
|
||||
}
|
||||
const std::string &Fn = FuncName(AccessSize, IsWrite);
|
||||
MCSymbol *FnSym = Ctx.GetOrCreateSymbol(StringRef(Fn));
|
||||
MCSymbol *FnSym = Ctx.getOrCreateSymbol(StringRef(Fn));
|
||||
const MCSymbolRefExpr *FnExpr =
|
||||
MCSymbolRefExpr::Create(FnSym, MCSymbolRefExpr::VK_PLT, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::CALL64pcrel32).addExpr(FnExpr));
|
||||
@ -924,7 +924,7 @@ void X86AddressSanitizer64::InstrumentMemOperandSmall(
|
||||
|
||||
EmitInstruction(
|
||||
Out, MCInstBuilder(X86::TEST8rr).addReg(ShadowRegI8).addReg(ShadowRegI8));
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::JE_1).addExpr(DoneExpr));
|
||||
|
||||
@ -1000,7 +1000,7 @@ void X86AddressSanitizer64::InstrumentMemOperandLarge(
|
||||
EmitInstruction(Out, Inst);
|
||||
}
|
||||
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(Out, MCInstBuilder(X86::JE_1).addExpr(DoneExpr));
|
||||
|
||||
@ -1014,7 +1014,7 @@ void X86AddressSanitizer64::InstrumentMOVSImpl(unsigned AccessSize,
|
||||
StoreFlags(Out);
|
||||
|
||||
// No need to test when RCX is equals to zero.
|
||||
MCSymbol *DoneSym = Ctx.CreateTempSymbol();
|
||||
MCSymbol *DoneSym = Ctx.createTempSymbol();
|
||||
const MCExpr *DoneExpr = MCSymbolRefExpr::Create(DoneSym, Ctx);
|
||||
EmitInstruction(
|
||||
Out, MCInstBuilder(X86::TEST64rr).addReg(X86::RCX).addReg(X86::RCX));
|
||||
|
@ -1191,7 +1191,7 @@ bool X86AsmParser::ParseIntelExpression(IntelExprStateMachine &SM, SMLoc &End) {
|
||||
StringRef IDVal = getTok().getString();
|
||||
if (IDVal == "f" || IDVal == "b") {
|
||||
MCSymbol *Sym =
|
||||
getContext().GetDirectionalLocalSymbol(IntVal, IDVal == "b");
|
||||
getContext().getDirectionalLocalSymbol(IntVal, IDVal == "b");
|
||||
MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
|
||||
const MCExpr *Val =
|
||||
MCSymbolRefExpr::Create(Sym, Variant, getContext());
|
||||
@ -1351,7 +1351,7 @@ bool X86AsmParser::ParseIntelIdentifier(const MCExpr *&Val,
|
||||
}
|
||||
|
||||
// Create the symbol reference.
|
||||
MCSymbol *Sym = getContext().GetOrCreateSymbol(Identifier);
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier);
|
||||
MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
|
||||
Val = MCSymbolRefExpr::Create(Sym, Variant, getParser().getContext());
|
||||
return false;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
uint64_t SymSize; SymI->getSize(SymSize);
|
||||
int64_t Addend; getELFRelocationAddend(Rel, Addend);
|
||||
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName);
|
||||
// FIXME: check that the value is actually the same.
|
||||
if (!Sym->isVariable())
|
||||
Sym->setVariableValue(MCConstantExpr::Create(SymAddr, Ctx));
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
any_relocation_info RE = Obj->getRelocation(Rel.getRawDataRefImpl());
|
||||
bool isPCRel = Obj->getAnyRelocationPCRel(RE);
|
||||
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName);
|
||||
// FIXME: check that the value is actually the same.
|
||||
if (!Sym->isVariable())
|
||||
Sym->setVariableValue(MCConstantExpr::Create(SymAddr, Ctx));
|
||||
@ -92,7 +92,7 @@ public:
|
||||
StringRef RSymName;
|
||||
RSymI->getName(RSymName);
|
||||
|
||||
MCSymbol *RSym = Ctx.GetOrCreateSymbol(RSymName);
|
||||
MCSymbol *RSym = Ctx.getOrCreateSymbol(RSymName);
|
||||
if (!RSym->isVariable())
|
||||
RSym->setVariableValue(MCConstantExpr::Create(RSymAddr, Ctx));
|
||||
|
||||
|
@ -179,7 +179,7 @@ void X86MachObjectWriter::RecordX86_64Relocation(
|
||||
// non-relocatable expression.
|
||||
if (A->isUndefined() || B->isUndefined()) {
|
||||
StringRef Name = A->isUndefined() ? A->getName() : B->getName();
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
"unsupported relocation with subtraction expression, symbol '" +
|
||||
Name + "' can not be undefined in a subtraction expression");
|
||||
}
|
||||
@ -395,7 +395,7 @@ bool X86MachObjectWriter::RecordScatteredRelocation(MachObjectWriter *Writer,
|
||||
if (FixupOffset > 0xffffff) {
|
||||
char Buffer[32];
|
||||
format("0x%x", FixupOffset).print(Buffer, sizeof(Buffer));
|
||||
Asm.getContext().FatalError(Fixup.getLoc(),
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
Twine("Section too large, can't encode "
|
||||
"r_address (") + Buffer +
|
||||
") into 24 bits of scattered "
|
||||
|
@ -97,7 +97,7 @@ static void printSymbolOperand(X86AsmPrinter &P, const MachineOperand &MO,
|
||||
// Handle dllimport linkage.
|
||||
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
|
||||
GVSym =
|
||||
P.OutContext.GetOrCreateSymbol(Twine("__imp_") + GVSym->getName());
|
||||
P.OutContext.getOrCreateSymbol(Twine("__imp_") + GVSym->getName());
|
||||
|
||||
if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY ||
|
||||
MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE) {
|
||||
@ -513,7 +513,7 @@ void X86AsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
// Emit an absolute @feat.00 symbol. This appears to be some kind of
|
||||
// compiler features bitfield read by link.exe.
|
||||
if (TT.getArch() == Triple::x86) {
|
||||
MCSymbol *S = MMI->getContext().GetOrCreateSymbol(StringRef("@feat.00"));
|
||||
MCSymbol *S = MMI->getContext().getOrCreateSymbol(StringRef("@feat.00"));
|
||||
OutStreamer->BeginCOFFSymbolDef(S);
|
||||
OutStreamer->EmitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC);
|
||||
OutStreamer->EmitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_NULL);
|
||||
@ -682,7 +682,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
if (TT.isKnownWindowsMSVCEnvironment() && MMI->usesVAFloatArgument()) {
|
||||
StringRef SymbolName =
|
||||
(TT.getArch() == Triple::x86_64) ? "_fltused" : "__fltused";
|
||||
MCSymbol *S = MMI->getContext().GetOrCreateSymbol(SymbolName);
|
||||
MCSymbol *S = MMI->getContext().getOrCreateSymbol(SymbolName);
|
||||
OutStreamer->EmitSymbolAttribute(S, MCSA_Global);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
|
||||
unsigned OrigLen = Name.size() - PrefixLen;
|
||||
|
||||
Name += Suffix;
|
||||
MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
|
||||
|
||||
StringRef OrigName = StringRef(Name).substr(PrefixLen, OrigLen);
|
||||
|
||||
@ -212,7 +212,7 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
|
||||
} else {
|
||||
StubSym =
|
||||
MachineModuleInfoImpl::
|
||||
StubValueTy(Ctx.GetOrCreateSymbol(OrigName), false);
|
||||
StubValueTy(Ctx.getOrCreateSymbol(OrigName), false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -275,7 +275,7 @@ MCOperand X86MCInstLower::LowerSymbolOperand(const MachineOperand &MO,
|
||||
// relocations the assembler will generate for differences between
|
||||
// local labels. This is only safe when the symbols are in the same
|
||||
// section so we are restricting it to jumptable references.
|
||||
MCSymbol *Label = Ctx.CreateTempSymbol();
|
||||
MCSymbol *Label = Ctx.createTempSymbol();
|
||||
AsmPrinter.OutStreamer->EmitAssignment(Label, Expr);
|
||||
Expr = MCSymbolRefExpr::Create(Label, Ctx);
|
||||
}
|
||||
@ -747,7 +747,7 @@ void X86AsmPrinter::LowerTlsAddr(X86MCInstLower &MCInstLowering,
|
||||
}
|
||||
|
||||
StringRef name = is64Bits ? "__tls_get_addr" : "___tls_get_addr";
|
||||
MCSymbol *tlsGetAddr = context.GetOrCreateSymbol(name);
|
||||
MCSymbol *tlsGetAddr = context.getOrCreateSymbol(name);
|
||||
const MCSymbolRefExpr *tlsRef =
|
||||
MCSymbolRefExpr::Create(tlsGetAddr,
|
||||
MCSymbolRefExpr::VK_PLT,
|
||||
@ -1094,7 +1094,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
// MYGLOBAL + (. - PICBASE)
|
||||
// However, we can't generate a ".", so just emit a new label here and refer
|
||||
// to it.
|
||||
MCSymbol *DotSym = OutContext.CreateTempSymbol();
|
||||
MCSymbol *DotSym = OutContext.createTempSymbol();
|
||||
OutStreamer->EmitLabel(DotSym);
|
||||
|
||||
// Now that we have emitted the label, lower the complex operand expression.
|
||||
|
@ -96,7 +96,7 @@ void XCoreAsmPrinter::emitArrayBound(MCSymbol *Sym, const GlobalVariable *GV) {
|
||||
if (ArrayType *ATy = dyn_cast<ArrayType>(
|
||||
cast<PointerType>(GV->getType())->getElementType())) {
|
||||
|
||||
MCSymbol *SymGlob = OutContext.GetOrCreateSymbol(
|
||||
MCSymbol *SymGlob = OutContext.getOrCreateSymbol(
|
||||
Twine(Sym->getName() + StringRef(".globound")));
|
||||
OutStreamer->EmitSymbolAttribute(SymGlob, MCSA_Global);
|
||||
OutStreamer->EmitAssignment(SymGlob,
|
||||
|
@ -770,8 +770,8 @@ void DwarfStreamer::emitLineTableForUnit(StringRef PrologueBytes,
|
||||
unsigned PointerSize) {
|
||||
// Switch to the section where the table will be emitted into.
|
||||
MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLineSection());
|
||||
MCSymbol *LineStartSym = MC->CreateTempSymbol();
|
||||
MCSymbol *LineEndSym = MC->CreateTempSymbol();
|
||||
MCSymbol *LineStartSym = MC->createTempSymbol();
|
||||
MCSymbol *LineEndSym = MC->createTempSymbol();
|
||||
|
||||
// The first 4 bytes is the total length of the information for this
|
||||
// compilation unit (not including these 4 bytes for the length).
|
||||
|
Loading…
Reference in New Issue
Block a user