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/lib/Support/YAMLTraits.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Support/YAMLTraits.cpp') diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp index 09eb36943de..7706fc3c1f2 100644 --- a/llvm/lib/Support/YAMLTraits.cpp +++ b/llvm/lib/Support/YAMLTraits.cpp @@ -377,12 +377,12 @@ std::unique_ptr Input::createHNodes(Node *N) { // Copy string to permanent storage KeyStr = StringStorage.str().copy(StringAllocator); } - return llvm::make_unique(N, KeyStr); + return std::make_unique(N, KeyStr); } else if (BlockScalarNode *BSN = dyn_cast(N)) { StringRef ValueCopy = BSN->getValue().copy(StringAllocator); - return llvm::make_unique(N, ValueCopy); + return std::make_unique(N, ValueCopy); } else if (SequenceNode *SQ = dyn_cast(N)) { - auto SQHNode = llvm::make_unique(N); + auto SQHNode = std::make_unique(N); for (Node &SN : *SQ) { auto Entry = createHNodes(&SN); if (EC) @@ -391,7 +391,7 @@ std::unique_ptr Input::createHNodes(Node *N) { } return std::move(SQHNode); } else if (MappingNode *Map = dyn_cast(N)) { - auto mapHNode = llvm::make_unique(N); + auto mapHNode = std::make_unique(N); for (KeyValueNode &KVN : *Map) { Node *KeyNode = KVN.getKey(); ScalarNode *Key = dyn_cast(KeyNode); @@ -416,7 +416,7 @@ std::unique_ptr Input::createHNodes(Node *N) { } return std::move(mapHNode); } else if (isa(N)) { - return llvm::make_unique(N); + return std::make_unique(N); } else { setError(N, "unknown node kind"); return nullptr; -- cgit v1.2.3