[PATCH] D148259: Fix warnings in InstrProfTest.cpp

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 11:16:46 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG42c2fa62c833: Fix warnings in InstrProfTest.cpp (authored by ellis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148259/new/

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.513317.patch
Type: text/x-patch
Size: 1752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230413/50635094/attachment.bin>


More information about the llvm-commits mailing list