diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 00:06:49 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 00:06:49 +0000 |
commit | 5edd6843fa148ddc1b1a45b2bc66d1272a68d3c2 (patch) | |
tree | 29efd285dbf1fb50b093ef227c4ac8d1fffa6838 /compiler-rt/lib/xray | |
parent | 708c4605a16b1caae640343ccf2ec74a56aee30e (diff) | |
download | bcm5719-llvm-5edd6843fa148ddc1b1a45b2bc66d1272a68d3c2.tar.gz bcm5719-llvm-5edd6843fa148ddc1b1a45b2bc66d1272a68d3c2.zip |
[compiler-rt] 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.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368946
Diffstat (limited to 'compiler-rt/lib/xray')
-rw-r--r-- | compiler-rt/lib/xray/tests/unit/fdr_controller_test.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler-rt/lib/xray/tests/unit/fdr_controller_test.cpp b/compiler-rt/lib/xray/tests/unit/fdr_controller_test.cpp index f4808e42e43..3cf400786d6 100644 --- a/compiler-rt/lib/xray/tests/unit/fdr_controller_test.cpp +++ b/compiler-rt/lib/xray/tests/unit/fdr_controller_test.cpp @@ -51,11 +51,11 @@ protected: public: void SetUp() override { bool Success; - BQ = llvm::make_unique<BufferQueue>(4096, 1, Success); + BQ = std::make_unique<BufferQueue>(4096, 1, Success); ASSERT_TRUE(Success); ASSERT_EQ(BQ->getBuffer(B), BufferQueue::ErrorCode::Ok); - W = llvm::make_unique<FDRLogWriter>(B); - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 0); + W = std::make_unique<FDRLogWriter>(B); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 0); } }; @@ -103,7 +103,7 @@ TEST_F(FunctionSequenceTest, BoundaryFuncIdEncoding) { } TEST_F(FunctionSequenceTest, ThresholdsAreEnforced) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); ASSERT_TRUE(C->functionEnter(1, 2, 3)); ASSERT_TRUE(C->functionExit(1, 2, 3)); ASSERT_TRUE(C->flush()); @@ -118,7 +118,7 @@ TEST_F(FunctionSequenceTest, ThresholdsAreEnforced) { } TEST_F(FunctionSequenceTest, ArgsAreHandledAndKept) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); ASSERT_TRUE(C->functionEnterArg(1, 2, 3, 4)); ASSERT_TRUE(C->functionExit(1, 2, 3)); ASSERT_TRUE(C->flush()); @@ -138,7 +138,7 @@ TEST_F(FunctionSequenceTest, ArgsAreHandledAndKept) { } TEST_F(FunctionSequenceTest, PreservedCallsHaveCorrectTSC) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); uint64_t TSC = 1; uint16_t CPU = 0; ASSERT_TRUE(C->functionEnter(1, TSC++, CPU)); @@ -163,7 +163,7 @@ TEST_F(FunctionSequenceTest, PreservedCallsHaveCorrectTSC) { } TEST_F(FunctionSequenceTest, PreservedCallsSupportLargeDeltas) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); uint64_t TSC = 1; uint16_t CPU = 0; const auto LargeDelta = uint64_t{std::numeric_limits<int32_t>::max()}; @@ -187,7 +187,7 @@ TEST_F(FunctionSequenceTest, PreservedCallsSupportLargeDeltas) { } TEST_F(FunctionSequenceTest, RewindingMultipleCalls) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); // First we construct an arbitrarily deep function enter/call stack. // We also ensure that we are in the same CPU. @@ -214,7 +214,7 @@ TEST_F(FunctionSequenceTest, RewindingMultipleCalls) { } TEST_F(FunctionSequenceTest, RewindingIntermediaryTailExits) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); // First we construct an arbitrarily deep function enter/call stack. // We also ensure that we are in the same CPU. @@ -248,7 +248,7 @@ TEST_F(FunctionSequenceTest, RewindingIntermediaryTailExits) { } TEST_F(FunctionSequenceTest, RewindingAfterMigration) { - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 1000); // First we construct an arbitrarily deep function enter/call stack. // We also ensure that we are in the same CPU. @@ -303,13 +303,13 @@ protected: public: void SetUp() override { bool Success; - BQ = llvm::make_unique<BufferQueue>(sizeof(MetadataRecord) * 5 + + BQ = std::make_unique<BufferQueue>(sizeof(MetadataRecord) * 5 + sizeof(FunctionRecord) * 2, kBuffers, Success); ASSERT_TRUE(Success); ASSERT_EQ(BQ->getBuffer(B), BufferQueue::ErrorCode::Ok); - W = llvm::make_unique<FDRLogWriter>(B); - C = llvm::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 0); + W = std::make_unique<FDRLogWriter>(B); + C = std::make_unique<FDRController<>>(BQ.get(), B, *W, clock_gettime, 0); } }; |