diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 05:57:55 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 05:57:55 +0000 |
commit | 48878ae579ada982eb35053cfe8d1c68c8e51c56 (patch) | |
tree | e3567634fe670b1b09ad341368d5600c30cd7e0f /llvm/lib/Target | |
parent | f42ec7903f9fc4794a09bab49f4ada4159dedf5b (diff) | |
download | bcm5719-llvm-48878ae579ada982eb35053cfe8d1c68c8e51c56.tar.gz bcm5719-llvm-48878ae579ada982eb35053cfe8d1c68c8e51c56.zip |
Use StringRef in Datalayout API (NFC)
llvm-svn: 283013
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp index 991bed026bb..3d3a4930619 100644 --- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -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)); diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index 27d2c4b356d..b73225ef1e8 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -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) |