aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-07-18 05:26:13 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-07-18 05:26:13 +0000
commitdce67a70a86db8758c926a76fdd980f5369d5746 (patch)
tree09c44f9dc494113bc9e18f99996d922e31b86b80 /lib/AST/ASTContext.cpp
parent2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d (diff)
In C99, emit an inline function when encountering an extern redeclaration.
Fixes PR10233! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 6eada6e22f..9f3be94a95 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -6405,7 +6405,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
// Forward declarations aren't required.
if (!FD->doesThisDeclarationHaveABody())
- return false;
+ return FD->doesDeclarationForceExternallyVisibleDefinition();
// Constructors and destructors are required.
if (FD->hasAttr<ConstructorAttr>() || FD->hasAttr<DestructorAttr>())