[llvm] r244832 - IRBuilder: Use move semantics for the IRBuilderInserter parameter
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 16:18:50 PDT 2015
Author: dblaikie
Date: Wed Aug 12 18:18:49 2015
New Revision: 244832
URL: http://llvm.org/viewvc/llvm-project?rev=244832&view=rev
Log:
IRBuilder: Use move semantics for the IRBuilderInserter parameter
Just drive by cleanup while fixing -Wdeprecated warnings.
Modified:
llvm/trunk/include/llvm/IR/IRBuilder.h
Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=244832&r1=244831&r2=244832&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Wed Aug 12 18:18:49 2015
@@ -517,10 +517,9 @@ template<bool preserveNames = true, type
class IRBuilder : public IRBuilderBase, public Inserter {
T Folder;
public:
- IRBuilder(LLVMContext &C, const T &F, const Inserter &I = Inserter(),
+ IRBuilder(LLVMContext &C, const T &F, Inserter I = Inserter(),
MDNode *FPMathTag = nullptr)
- : IRBuilderBase(C, FPMathTag), Inserter(I), Folder(F) {
- }
+ : IRBuilderBase(C, FPMathTag), Inserter(std::move(I)), Folder(F) {}
explicit IRBuilder(LLVMContext &C, MDNode *FPMathTag = nullptr)
: IRBuilderBase(C, FPMathTag), Folder() {
More information about the llvm-commits
mailing list