diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-10-11 22:09:24 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-10-11 22:09:24 +0000 |
commit | 8a1d6a5eec8287729084e2a79b39fac96a9c75cd (patch) | |
tree | af3f84840a7c2dc4ab467577273e5a9d0cc98944 /lib/AST/Decl.cpp | |
parent | 0c91cce098fcf9081157c0a0d8b2282573926879 (diff) |
PR11062: Make C99 inlining work properly for names with associated builtin libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 5cd98584bf..3e5c253737 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1856,7 +1856,12 @@ bool FunctionDecl::isInlineDefinitionExternallyVisible() const { // Only consider file-scope declarations in this test. if (!Redecl->getLexicalDeclContext()->isTranslationUnit()) continue; - + + // Only consider explicit declarations; the presence of a builtin for a + // libcall shouldn't affect whether a definition is externally visible. + if (Redecl->isImplicit()) + continue; + if (!Redecl->isInlineSpecified() || Redecl->getStorageClass() == SC_Extern) return true; // Not an inline definition } |