From 0eaee545eef49ff9498234d3a51a5cbde59bf976 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 15 Aug 2019 15:54:37 +0000 Subject: [llvm] Migrate llvm::make_unique to std::make_unique Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013 --- llvm/utils/TableGen/GlobalISelEmitter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/utils/TableGen/GlobalISelEmitter.cpp') diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index 06cdfd4ab59..aba2b9c3a62 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -1450,7 +1450,7 @@ public: Optional addPredicate(Args &&... args) { if (isSameAsAnotherOperand()) return None; - Predicates.emplace_back(llvm::make_unique( + Predicates.emplace_back(std::make_unique( getInsnVarID(), getOpIdx(), std::forward(args)...)); return static_cast(Predicates.back().get()); } @@ -1999,7 +1999,7 @@ public: template Optional addPredicate(Args &&... args) { Predicates.emplace_back( - llvm::make_unique(getInsnVarID(), std::forward(args)...)); + std::make_unique(getInsnVarID(), std::forward(args)...)); return static_cast(Predicates.back().get()); } @@ -2662,7 +2662,7 @@ public: template Kind &addRenderer(Args&&... args) { OperandRenderers.emplace_back( - llvm::make_unique(InsnID, std::forward(args)...)); + std::make_unique(InsnID, std::forward(args)...)); return *static_cast(OperandRenderers.back().get()); } @@ -2823,7 +2823,7 @@ const std::vector &RuleMatcher::getRequiredFeatures() const { // iterator. template Kind &RuleMatcher::addAction(Args &&... args) { - Actions.emplace_back(llvm::make_unique(std::forward(args)...)); + Actions.emplace_back(std::make_unique(std::forward(args)...)); return *static_cast(Actions.back().get()); } @@ -2838,7 +2838,7 @@ template action_iterator RuleMatcher::insertAction(action_iterator InsertPt, Args &&... args) { return Actions.emplace(InsertPt, - llvm::make_unique(std::forward(args)...)); + std::make_unique(std::forward(args)...)); } unsigned RuleMatcher::implicitlyDefineInsnVar(InstructionMatcher &Matcher) { @@ -4289,7 +4289,7 @@ std::vector GlobalISelEmitter::optimizeRules( std::vector> &MatcherStorage) { std::vector OptRules; - std::unique_ptr CurrentGroup = make_unique(); + std::unique_ptr CurrentGroup = std::make_unique(); assert(CurrentGroup->empty() && "Newly created group isn't empty!"); unsigned NumGroups = 0; @@ -4310,7 +4310,7 @@ std::vector GlobalISelEmitter::optimizeRules( MatcherStorage.emplace_back(std::move(CurrentGroup)); ++NumGroups; } - CurrentGroup = make_unique(); + CurrentGroup = std::make_unique(); }; for (Matcher *Rule : Rules) { // Greedily add as many matchers as possible to the current group: -- cgit v1.2.3