Revert "Fix linkage of 'static inline' Clang-imported definitions"

This reverts commit r31763, as it was breaking the bots:

Swift SVN r31765
This commit is contained in:
Dave Abrahams
2015-09-08 16:31:35 +00:00
parent 33feabb504
commit 8269d8130b
9 changed files with 12 additions and 62 deletions

View File

@@ -215,9 +215,6 @@ bool SILDeclRef::isClangImported() const {
DeclContext *moduleContext = d->getDeclContext()->getModuleScopeContext();
if (isa<ClangModuleUnit>(moduleContext)) {
if (isClangGenerated())
return true;
if (isa<ConstructorDecl>(d) || isa<EnumElementDecl>(d))
return true;
@@ -229,21 +226,6 @@ bool SILDeclRef::isClangImported() const {
return false;
}
bool SILDeclRef::isClangGenerated() const {
if (!hasDecl())
return false;
if (auto *FD = dyn_cast<FuncDecl>(getDecl())) {
auto clangNode = FD->getClangNode().getAsDecl();
if (auto fd = dyn_cast_or_null<clang::FunctionDecl>(clangNode)) {
if (fd->hasBody())
return true;
}
}
return false;
}
SILLinkage SILDeclRef::getLinkage(ForDefinition_t forDefinition) const {
// Anonymous functions have local linkage.
if (auto closure = getAbstractClosureExpr())