File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1630,8 +1630,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1630
1630
1631
1631
void checkBuiltinInst (BuiltinInst *BI) {
1632
1632
// Check for special constraints on llvm intrinsics.
1633
- if (BI->getIntrinsicInfo ().ID != llvm::Intrinsic::not_intrinsic)
1633
+ if (BI->getIntrinsicInfo ().ID != llvm::Intrinsic::not_intrinsic) {
1634
1634
verifyLLVMIntrinsic (BI, BI->getIntrinsicInfo ().ID );
1635
+ return ;
1636
+ }
1637
+
1638
+ // At this point, we know that we have a Builtin that is a Swift Builtin
1639
+ // rather than an llvm intrinsic. Make sure our name corresponds to an
1640
+ // actual ValueDecl. Otherwise, we have an invalid builtin.
1641
+ require (getBuiltinValueDecl (BI->getModule ().getASTContext (), BI->getName ()),
1642
+ " Invalid builtin name?!" );
1635
1643
}
1636
1644
1637
1645
void checkFunctionRefBaseInst (FunctionRefBaseInst *FRI) {
You can’t perform that action at this time.
0 commit comments