mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user