[llvm] [memprof] Use std::make_unique in unit tests (NFC) (PR #119175)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 23:41:40 PST 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/119175
None
>From aef6edd72ceb534db051aab67e03da691a4e2334 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 8 Dec 2024 23:22:55 -0800
Subject: [PATCH] [memprof] Use std::make_unique in unit tests (NFC)
---
llvm/unittests/ProfileData/MemProfTest.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index db9565e4755287..093b3a26b5f872 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -123,7 +123,7 @@ MATCHER_P4(FrameContains, FunctionName, LineOffset, Column, Inline, "") {
}
TEST(MemProf, FillsValue) {
- std::unique_ptr<MockSymbolizer> Symbolizer(new MockSymbolizer());
+ auto Symbolizer = std::make_unique<MockSymbolizer>();
EXPECT_CALL(*Symbolizer, symbolizeInlinedCode(SectionedAddress{0x1000},
specifier(), false))
@@ -341,7 +341,7 @@ TEST(MemProf, RecordSerializationRoundTripVersion2HotColdSchema) {
}
TEST(MemProf, SymbolizationFilter) {
- std::unique_ptr<MockSymbolizer> Symbolizer(new MockSymbolizer());
+ auto Symbolizer = std::make_unique<MockSymbolizer>();
EXPECT_CALL(*Symbolizer, symbolizeInlinedCode(SectionedAddress{0x1000},
specifier(), false))
More information about the llvm-commits
mailing list