]> granicus.if.org Git - llvm/commitdiff
Revert "Use StringRef in Datalayout API (NFC)"
authorMehdi Amini <mehdi.amini@apple.com>
Sat, 1 Oct 2016 05:12:48 +0000 (05:12 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Sat, 1 Oct 2016 05:12:48 +0000 (05:12 +0000)
This reverts commit r283009. Bots are broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283011 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/DataLayout.h
lib/CodeGen/MachineFunction.cpp
lib/Target/ARM/ARMAsmPrinter.cpp

index abcb19bc7c210859f7eec2e466fb995bdbb38b73..e309e93a14e519428a54dd8a5775f3c4a3855708 100644 (file)
@@ -261,7 +261,7 @@ public:
 
   bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; }
 
-  StringRef getLinkerPrivateGlobalPrefix() const {
+  const char *getLinkerPrivateGlobalPrefix() const {
     if (ManglingMode == MM_MachO)
       return "l";
     return "";
@@ -281,7 +281,7 @@ public:
     llvm_unreachable("invalid mangling mode");
   }
 
-  StringRef getPrivateGlobalPrefix() const {
+  const char *getPrivateGlobalPrefix() const {
     switch (ManglingMode) {
     case MM_None:
       return "";
index 7190fbd56422925f4ef25c139f66fb79076be4d1..dd306b8af781545e754e25b2859f05d8d07ee063 100644 (file)
@@ -544,7 +544,7 @@ MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,
   assert(JumpTableInfo && "No jump tables");
   assert(JTI < JumpTableInfo->getJumpTables().size() && "Invalid JTI!");
 
-  StringRef Prefix = isLinkerPrivate ? DL.getLinkerPrivateGlobalPrefix()
+  const char *Prefix = isLinkerPrivate ? DL.getLinkerPrivateGlobalPrefix()
                                        : DL.getPrivateGlobalPrefix();
   SmallString<60> Name;
   raw_svector_ostream(Name)
index b73225ef1e8f09662cc650eef25bd2fd96426e83..27d2c4b356d716ea13c2c5f9d49cb234a0ba91b7 100644 (file)
@@ -939,7 +939,7 @@ void ARMAsmPrinter::emitAttributes() {
 
 //===----------------------------------------------------------------------===//
 
-static MCSymbol *getPICLabel(StringRef Prefix, unsigned FunctionNumber,
+static MCSymbol *getPICLabel(const char *Prefix, unsigned FunctionNumber,
                              unsigned LabelId, MCContext &Ctx) {
 
   MCSymbol *Label = Ctx.getOrCreateSymbol(Twine(Prefix)