Skip to content

Commit 5e6675b

Browse files
necipfazilPrabhuk
authored andcommitted
Update IR verifier.
Created using spr 1.3.6-beta.1
2 parents 2f763c0 + 5857d51 commit 5e6675b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3794,6 +3794,11 @@ void Verifier::visitCallBase(CallBase &Call) {
37943794
} else if (Tag == LLVMContext::OB_callee_type) {
37953795
Check(!FoundCalleeTypeBundle, "Multiple \"callee_type\" operand bundles",
37963796
Call);
3797+
auto *OBVal = BU.Inputs.front().get();
3798+
auto *TypeIdMD = cast<MetadataAsValue>(OBVal)->getMetadata();
3799+
auto *TypeIdStr = cast<MDString>(TypeIdMD);
3800+
Check(TypeIdStr->getString().ends_with(".generalized"),
3801+
"Invalid \"callee_type\" type identifier", Call);
37973802
FoundCalleeTypeBundle = true;
37983803
}
37993804
}

0 commit comments

Comments
 (0)