[PATCH] D148259: Fix warnings in InstrProfTest.cpp
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 11:10:25 PDT 2023
ellis created this revision.
Herald added a project: All.
ellis requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The warnings were introduced in https://reviews.llvm.org/D148150
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148259
Files:
llvm/unittests/ProfileData/InstrProfTest.cpp
Index: llvm/unittests/ProfileData/InstrProfTest.cpp
===================================================================
--- llvm/unittests/ProfileData/InstrProfTest.cpp
+++ llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -249,7 +249,7 @@
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 @@
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 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148259.513313.patch
Type: text/x-patch
Size: 1752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230413/ce4ace84/attachment.bin>
More information about the llvm-commits
mailing list