Skip to content

Commit f144d7f

Browse files
committed
[IR][PGO] Verify the structure of VP metadata.
1 parent 1464876 commit f144d7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5008,9 +5008,10 @@ void Verifier::visitProfMetadata(Instruction &I, MDNode *MD) {
50085008
Check(mdconst::dyn_extract<ConstantInt>(MDO),
50095009
"!prof brunch_weights operand is not a const int");
50105010
}
5011+
} else if (ProfName == "VP") {
5012+
50115013
} else {
5012-
Check(ProfName == "VP", "expected either branch_weights or VP profile name",
5013-
MD);
5014+
CheckFailed("expected either branch_weights or VP profile name", MD);
50145015
}
50155016
}
50165017

0 commit comments

Comments
 (0)