Remove unnecessary conversion from StringRef to std::string and back to StringRef...
authorCraig Topper <craig.topper@gmail.com>
Wed, 10 Jun 2015 02:07:37 +0000 (02:07 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 10 Jun 2015 02:07:37 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239455 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp

index 96fbe3a..7f56c2c 100644 (file)
@@ -1358,7 +1358,7 @@ void AArch64InstPrinter::printSystemPStateField(const MCInst *MI, unsigned OpNo,
   StringRef Name =
       AArch64PState::PStateMapper().toString(Val, STI.getFeatureBits(), Valid);
   if (Valid)
-    O << StringRef(Name.str()).upper();
+    O << Name.upper();
   else
     O << "#" << Val;
 }