From b58b3e879d3b053dfb14342105b4b4bc27c069f3 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 24 Aug 2011 00:33:55 +0000 Subject: Make constant aggregate constant initializers private linkage. After talking with John making this the case for all of these is the right way to go. Fixes rdar://9804564 and PR10414 llvm-svn: 138418 --- clang/lib/CodeGen/CGDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib') diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 6d1e9b03ab8..0f6ceedb25c 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -982,7 +982,7 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { std::string Name = GetStaticDeclName(*this, D, "."); llvm::GlobalVariable *GV = new llvm::GlobalVariable(CGM.getModule(), constant->getType(), true, - llvm::GlobalValue::InternalLinkage, + llvm::GlobalValue::PrivateLinkage, constant, Name, 0, false, 0); GV->setAlignment(alignment.getQuantity()); GV->setUnnamedAddr(true); -- cgit v1.2.3