]> granicus.if.org Git - clang/commitdiff
Fix a thinko that John pointed out
authorDouglas Gregor <dgregor@apple.com>
Wed, 14 Oct 2009 21:36:34 +0000 (21:36 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 14 Oct 2009 21:36:34 +0000 (21:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84142 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index ecf8eb0d27df9783661b72399b94ff52a9e840f2..4763b7fc1ee23ad6f8a403559f157a12359f2966 100644 (file)
@@ -1058,9 +1058,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
 
   // Set the llvm linkage type as appropriate.
   GVALinkage Linkage = GetLinkageForVariable(getContext(), D);
-  if (D->isInAnonymousNamespace())
-    GV->setLinkage(llvm::Function::InternalLinkage);
-  else if (Linkage == GVA_Internal)
+  if (Linkage == GVA_Internal)
     GV->setLinkage(llvm::Function::InternalLinkage);
   else if (D->hasAttr<DLLImportAttr>())
     GV->setLinkage(llvm::Function::DLLImportLinkage);