Fix linkage of 'static inline' Clang-imported definitions

If an external SIL function has a Clang-generated body, I think this
means we have a static function, and we want to use Shared linkage,
not Public.

Add a new flag to SILFunction for this and plumb it through to
appease assertions from SILVerifier.

Swift SVN r31763
This commit is contained in:
Slava Pestov
2015-09-08 06:26:35 +00:00
parent ae6afdda54
commit fc0a18be3f
9 changed files with 62 additions and 12 deletions

View File

@@ -89,6 +89,7 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage,
InlineStrategy(inlineStrategy),
Linkage(unsigned(Linkage)),
KeepAsPublic(false),
ForeignBody(false),
EK(E) {
if (InsertBefore)
Module.functions.insert(SILModule::iterator(InsertBefore), this);