Skip to content

Commit c454adb

Browse files
committed
---
yaml --- r: 347262 b: refs/heads/master c: e265f50 h: refs/heads/master
1 parent 2b12610 commit c454adb

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
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: 6e69563f0c396e1c81a7d82640e7d3480026a2ce
2+
refs/heads/master: e265f50e8309dfaa4701f51eb13fb25794fd2d68
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/Sema/TypeCheckAttr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,6 +2570,9 @@ void TypeChecker::addImplicitDynamicAttribute(Decl *D) {
25702570
// Don't add dynamic to defer bodies.
25712571
if (FD->isDeferBody())
25722572
return;
2573+
// Don't add dynamic to functions with a cdecl.
2574+
if (FD->getAttrs().hasAttribute<CDeclAttr>())
2575+
return;
25732576
}
25742577

25752578
if (auto *VD = dyn_cast<VarDecl>(D)) {

trunk/test/SILGen/dynamically_replaceable.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ dynamic func funcWithDefaultArg(_ arg : String = String("hello")) {
357357
print("hello")
358358
}
359359

360+
// IMPLICIT-LABEL: sil hidden [thunk] [ossa] @barfoo
361+
@_cdecl("barfoo")
362+
func foobar() {
363+
}
364+
360365
// IMPLICIT-LABEL: sil private [ossa] @$s23dynamically_replaceable6$deferL_yyF
361366
var x = 10
362367
defer {

0 commit comments

Comments
 (0)