From 43a68c82e51919cc6d38187f95d30fef456e6ad7 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Tue, 8 Dec 2015 03:50:32 +0000 Subject: [PATCH] [OperandBundles] Remove unncessary constructor 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 | 3 --- lib/Transforms/Utils/InlineFunction.cpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/llvm/IR/InstrTypes.h b/include/llvm/IR/InstrTypes.h index 157cb27cefb..2a092726665 100644 --- a/include/llvm/IR/InstrTypes.h +++ b/include/llvm/IR/InstrTypes.h @@ -1167,9 +1167,6 @@ template class OperandBundleDefT { std::vector Inputs; public: - explicit OperandBundleDefT(StringRef Tag, std::vector Inputs) - : Tag(Tag), Inputs(std::move(Inputs)) {} - explicit OperandBundleDefT(std::string Tag, std::vector Inputs) : Tag(std::move(Tag)), Inputs(std::move(Inputs)) {} diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index aee84c07d59..52bde6797db 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -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; -- 2.34.1