From d3c1821f5fcb2a43e46a1e931756dce6502cda7e Mon Sep 17 00:00:00 2001 From: laith sakka Date: Wed, 5 Jun 2019 10:32:29 -0700 Subject: [PATCH] Compile Bolt using std 14. Summary: Compile Bolt using std 14. We want that to be able to use some threading the locking tools that do not exists in std 11. (cherry picked from FBD15671736) --- bolt/CMakeLists.txt | 1 + bolt/src/DataReader.cpp | 2 +- bolt/src/ProfileWriter.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt index 7860179253b3..ae2f324c7289 100644 --- a/bolt/CMakeLists.txt +++ b/bolt/CMakeLists.txt @@ -1,5 +1,6 @@ set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(CMAKE_CXX_STANDARD 14) add_subdirectory(src) add_subdirectory(test) diff --git a/bolt/src/DataReader.cpp b/bolt/src/DataReader.cpp index dc34a301065c..869cfbc60eb6 100644 --- a/bolt/src/DataReader.cpp +++ b/bolt/src/DataReader.cpp @@ -267,7 +267,7 @@ DataReader::readPerfData(StringRef Path, raw_ostream &Diag) { Diag << "cannot open " << Path << ": " << EC.message() << "\n"; return EC; } - auto DR = make_unique(std::move(MB.get()), Diag); + auto DR = llvm::make_unique(std::move(MB.get()), Diag); if (auto EC = DR->parse()) { return EC; } diff --git a/bolt/src/ProfileWriter.cpp b/bolt/src/ProfileWriter.cpp index f88dbdc45bb1..3f455813244a 100644 --- a/bolt/src/ProfileWriter.cpp +++ b/bolt/src/ProfileWriter.cpp @@ -161,7 +161,7 @@ ProfileWriter::writeProfile(const RewriteInstance &RI) { const auto &Functions = RI.getBinaryContext().getBinaryFunctions(); std::error_code EC; - OS = make_unique(FileName, EC, sys::fs::F_None); + OS = llvm::make_unique(FileName, EC, sys::fs::F_None); if (EC) { errs() << "BOLT-WARNING: " << EC.message() << " : unable to open " << FileName << " for output.\n";