Skip to content

Commit 5bcfb15

Browse files
committed
---
yaml --- r: 348599 b: refs/heads/master c: 41eb451 h: refs/heads/master i: 348597: ef55859 348595: 5c244b3 348591: a993c53
1 parent 008b45f commit 5bcfb15

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c501814bf9ff8b03ff6da89308c4c7e9ba9240ec
2+
refs/heads/master: 41eb45190bf455056e3ffd1bef059aa295771eff
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/SIL/SILVerifier.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,8 +1630,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
16301630

16311631
void checkBuiltinInst(BuiltinInst *BI) {
16321632
// 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) {
16341634
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?!");
16351643
}
16361644

16371645
void checkFunctionRefBaseInst(FunctionRefBaseInst *FRI) {

0 commit comments

Comments
 (0)