[llvm] [ProfileData] Migrate to a new version of getValueProfDataFromInst (PR #95568)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 14:36:14 PDT 2024
================
@@ -941,12 +941,11 @@ TEST_P(MaybeSparseInstrProfTest, annotate_vp_data) {
Instruction *Inst2 = Builder.CreateCondBr(Builder.getTrue(), TBB, FBB);
annotateValueSite(*M, *Inst, R.get(), IPVK_IndirectCallTarget, 0);
- InstrProfValueData ValueData[5];
uint32_t N;
uint64_t T;
- bool Res = getValueProfDataFromInst(*Inst, IPVK_IndirectCallTarget, 5,
- ValueData, N, T);
- ASSERT_TRUE(Res);
+ auto ValueData =
+ getValueProfDataFromInst(*Inst, IPVK_IndirectCallTarget, 5, N, T);
+ ASSERT_TRUE(!!ValueData);
----------------
minglotus-6 wrote:
hmm, what do you think about `ASSERT_NE(ValueData, nullptr)`?
https://github.com/llvm/llvm-project/pull/95568
More information about the llvm-commits
mailing list