From ab27d6ea7b4ce2762a16905281de796db32bb6f2 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 20 Jun 2011 17:50:03 +0000 Subject: llvm-gcc treats a tentative definition with a previous (or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133450 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 57b4f7f2ae..7f4546f079 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1351,7 +1351,8 @@ CodeGenModule::GetLLVMLinkageVarDefinition(const VarDecl *D, ((!CodeGenOpts.NoCommon && !D->getAttr()) || D->getAttr()) && !D->hasExternalStorage() && !D->getInit() && - !D->getAttr() && !D->isThreadSpecified()) { + !D->getAttr() && !D->isThreadSpecified() && + !D->getAttr()) { // Thread local vars aren't considered common linkage. return llvm::GlobalVariable::CommonLinkage; } -- cgit v1.2.3