mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-20 18:56:04 +00:00
Use StringRef in Datalayout API (NFC)
llvm-svn: 283013
This commit is contained in:
parent
74130c0750
commit
356d607cc1
@ -261,7 +261,7 @@ public:
|
||||
|
||||
bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; }
|
||||
|
||||
const char *getLinkerPrivateGlobalPrefix() const {
|
||||
StringRef getLinkerPrivateGlobalPrefix() const {
|
||||
if (ManglingMode == MM_MachO)
|
||||
return "l";
|
||||
return "";
|
||||
@ -281,7 +281,7 @@ public:
|
||||
llvm_unreachable("invalid mangling mode");
|
||||
}
|
||||
|
||||
const char *getPrivateGlobalPrefix() const {
|
||||
StringRef getPrivateGlobalPrefix() const {
|
||||
switch (ManglingMode) {
|
||||
case MM_None:
|
||||
return "";
|
||||
|
@ -544,8 +544,8 @@ MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,
|
||||
assert(JumpTableInfo && "No jump tables");
|
||||
assert(JTI < JumpTableInfo->getJumpTables().size() && "Invalid JTI!");
|
||||
|
||||
const char *Prefix = isLinkerPrivate ? DL.getLinkerPrivateGlobalPrefix()
|
||||
: DL.getPrivateGlobalPrefix();
|
||||
StringRef Prefix = isLinkerPrivate ? DL.getLinkerPrivateGlobalPrefix()
|
||||
: DL.getPrivateGlobalPrefix();
|
||||
SmallString<60> Name;
|
||||
raw_svector_ostream(Name)
|
||||
<< Prefix << "JTI" << getFunctionNumber() << '_' << JTI;
|
||||
|
@ -160,7 +160,7 @@ MCSymbol *AArch64AsmPrinter::GetCPISymbol(unsigned CPID) const {
|
||||
// Darwin uses a linker-private symbol name for constant-pools (to
|
||||
// avoid addends on the relocation?), ELF has no such concept and
|
||||
// uses a normal private symbol.
|
||||
if (getDataLayout().getLinkerPrivateGlobalPrefix()[0])
|
||||
if (!getDataLayout().getLinkerPrivateGlobalPrefix().empty())
|
||||
return OutContext.getOrCreateSymbol(
|
||||
Twine(getDataLayout().getLinkerPrivateGlobalPrefix()) + "CPI" +
|
||||
Twine(getFunctionNumber()) + "_" + Twine(CPID));
|
||||
|
@ -939,7 +939,7 @@ void ARMAsmPrinter::emitAttributes() {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static MCSymbol *getPICLabel(const char *Prefix, unsigned FunctionNumber,
|
||||
static MCSymbol *getPICLabel(StringRef Prefix, unsigned FunctionNumber,
|
||||
unsigned LabelId, MCContext &Ctx) {
|
||||
|
||||
MCSymbol *Label = Ctx.getOrCreateSymbol(Twine(Prefix)
|
||||
|
Loading…
x
Reference in New Issue
Block a user