[llvm] 42c2fa6 - Fix warnings in InstrProfTest.cpp
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 11:16:33 PDT 2023
Author: Ellis Hoag
Date: 2023-04-13T11:16:28-07:00
New Revision: 42c2fa62c83335c1fb6d88939d54ceb8c60c4d7a
URL: https://github.com/llvm/llvm-project/commit/42c2fa62c83335c1fb6d88939d54ceb8c60c4d7a
DIFF: https://github.com/llvm/llvm-project/commit/42c2fa62c83335c1fb6d88939d54ceb8c60c4d7a.diff
LOG: Fix warnings in InstrProfTest.cpp
The warnings were introduced in https://reviews.llvm.org/D148150
Reviewed By: snehasish
Differential Revision: https://reviews.llvm.org/D148259
Added:
Modified:
llvm/unittests/ProfileData/InstrProfTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index 26211bd98142e..3ed21767035d2 100644
--- a/llvm/unittests/ProfileData/InstrProfTest.cpp
+++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -249,7 +249,7 @@ TEST_F(InstrProfTest, test_merge_temporal_prof_traces_truncated) {
SmallTrace.FunctionNameRefs = {IndexedInstrProf::ComputeHash("foo"),
IndexedInstrProf::ComputeHash("bar")};
- SmallVector Traces = {LargeTrace, SmallTrace};
+ SmallVector<TemporalProfTraceTy, 4> Traces = {LargeTrace, SmallTrace};
Writer.addTemporalProfileTraces(Traces, 2);
auto Profile = Writer.writeBuffer();
@@ -275,7 +275,7 @@ TEST_F(InstrProfTest, test_merge_traces_from_writer) {
FooTrace.FunctionNameRefs = {IndexedInstrProf::ComputeHash("foo")};
BarTrace.FunctionNameRefs = {IndexedInstrProf::ComputeHash("bar")};
- SmallVector Traces1({FooTrace}), Traces2({BarTrace});
+ SmallVector<TemporalProfTraceTy, 4> Traces1({FooTrace}), Traces2({BarTrace});
Writer.addTemporalProfileTraces(Traces1, 1);
Writer2.addTemporalProfileTraces(Traces2, 1);
Writer.mergeRecordsFromWriter(std::move(Writer2), Err);
@@ -302,10 +302,11 @@ TEST_F(InstrProfTest, test_merge_traces_sampled) {
GooTrace.FunctionNameRefs = {IndexedInstrProf::ComputeHash("Goo")};
// Add some sampled traces
- SmallVector SampledTraces = {FooTrace, BarTrace, GooTrace};
+ SmallVector<TemporalProfTraceTy, 4> SampledTraces = {FooTrace, BarTrace,
+ GooTrace};
Writer.addTemporalProfileTraces(SampledTraces, 5);
// Add some unsampled traces
- SmallVector UnsampledTraces = {BarTrace, GooTrace};
+ SmallVector<TemporalProfTraceTy, 4> UnsampledTraces = {BarTrace, GooTrace};
Writer.addTemporalProfileTraces(UnsampledTraces, 2);
UnsampledTraces = {FooTrace};
Writer.addTemporalProfileTraces(UnsampledTraces, 1);
More information about the llvm-commits
mailing list