[OperandBundles] Remove unncessary constructor
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 8 Dec 2015 03:50:32 +0000 (03:50 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 8 Dec 2015 03:50:32 +0000 (03:50 +0000)
The StringRef constructor is unnecessary (since we're converting to
std::string anyway), and having it requires an explicit call to
StringRef's or std::string's constructor.

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

include/llvm/IR/InstrTypes.h
lib/Transforms/Utils/InlineFunction.cpp

index 157cb27cefbb45d9e6920359e5e062d8743f1c54..2a0927266656bc3bc16d29ad18d7892ee4ccbaa2 100644 (file)
@@ -1167,9 +1167,6 @@ template <typename InputTy> class OperandBundleDefT {
   std::vector<InputTy> Inputs;
 
 public:
-  explicit OperandBundleDefT(StringRef Tag, std::vector<InputTy> Inputs)
-      : Tag(Tag), Inputs(std::move(Inputs)) {}
-
   explicit OperandBundleDefT(std::string Tag, std::vector<InputTy> Inputs)
       : Tag(std::move(Tag)), Inputs(std::move(Inputs)) {}
 
index aee84c07d5934b01543c7089141482c52dc1d167..52bde6797dbea0cd3e16baff3ae66b1f94df5a2c 100644 (file)
@@ -1191,7 +1191,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
           MergedDeoptArgs.insert(MergedDeoptArgs.end(), ChildOB.Inputs.begin(),
                                  ChildOB.Inputs.end());
 
-          OpDefs.emplace_back(StringRef("deopt"), std::move(MergedDeoptArgs));
+          OpDefs.emplace_back("deopt", std::move(MergedDeoptArgs));
         }
 
         Instruction *NewI = nullptr;