summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-lto
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-15 15:54:37 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-15 15:54:37 +0000
commit0eaee545eef49ff9498234d3a51a5cbde59bf976 (patch)
treefd7691e102022fb97622c5485fa8c4f506fc124e /llvm/tools/llvm-lto
parent1c34d10776828c0756ff4f0b2b9aa8bda2be348a (diff)
downloadbcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.gz
bcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.zip
[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
Diffstat (limited to 'llvm/tools/llvm-lto')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index eb3448e74e6..b47e68e8285 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -315,8 +315,8 @@ getLocalLTOModule(StringRef Path, std::unique_ptr<MemoryBuffer> &Buffer,
error(BufferOrErr, "error loading file '" + Path + "'");
Buffer = std::move(BufferOrErr.get());
CurrentActivity = ("loading file '" + Path + "'").str();
- std::unique_ptr<LLVMContext> Context = llvm::make_unique<LLVMContext>();
- Context->setDiagnosticHandler(llvm::make_unique<LLVMLTODiagnosticHandler>(),
+ std::unique_ptr<LLVMContext> Context = std::make_unique<LLVMContext>();
+ Context->setDiagnosticHandler(std::make_unique<LLVMLTODiagnosticHandler>(),
true);
ErrorOr<std::unique_ptr<LTOModule>> Ret = LTOModule::createInLocalContext(
std::move(Context), Buffer->getBufferStart(), Buffer->getBufferSize(),
@@ -921,7 +921,7 @@ int main(int argc, char **argv) {
unsigned BaseArg = 0;
LLVMContext Context;
- Context.setDiagnosticHandler(llvm::make_unique<LLVMLTODiagnosticHandler>(),
+ Context.setDiagnosticHandler(std::make_unique<LLVMLTODiagnosticHandler>(),
true);
LTOCodeGenerator CodeGen(Context);
OpenPOWER on IntegriCloud