OSDN Git Service

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 abcb19b..e309e93 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 7190fbd..dd306b8 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 b73225e..27d2c4b 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)