[cfe-commits] r127136 - in /cfe/trunk: lib/CodeGen/CGDecl.cpp test/CodeGen/decl.c
Douglas Gregor
dgregor at apple.com
Sun Mar 6 15:28:21 PST 2011
Author: dgregor
Date: Sun Mar 6 17:28:21 2011
New Revision: 127136
URL: http://llvm.org/viewvc/llvm-project?rev=127136&view=rev
Log:
Revert r126422 "Use private linkage to avoid symbol conflicts in
corner cases like the one in PR9301." which caused PR9416.
Modified:
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/test/CodeGen/decl.c
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=127136&r1=127135&r2=127136&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Sun Mar 6 17:28:21 2011
@@ -642,7 +642,7 @@
// candidate nor a __block variable, emit it as a global instead.
if (CGM.getCodeGenOpts().MergeAllConstants && Ty.isConstQualified() &&
!NRVO && !isByRef) {
- EmitStaticVarDecl(D, llvm::GlobalValue::PrivateLinkage);
+ EmitStaticVarDecl(D, llvm::GlobalValue::InternalLinkage);
emission.Address = 0; // signal this condition to later callbacks
assert(emission.wasEmittedAsGlobal());
Modified: cfe/trunk/test/CodeGen/decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/decl.c?rev=127136&r1=127135&r2=127136&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/decl.c (original)
+++ cfe/trunk/test/CodeGen/decl.c Sun Mar 6 17:28:21 2011
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -w -emit-llvm < %s | FileCheck %s
-// CHECK: @test1.x = private constant [12 x i32] [i32 1
+// CHECK: @test1.x = internal constant [12 x i32] [i32 1
// CHECK: @test2.x = internal constant [13 x i32] [i32 1,
// CHECK: @test5w = global %0 { i32 2, [4 x i8] undef }
// CHECK: @test5y = global %union.test5u { double 7.300000e+0{{[0]*}}1 }
More information about the cfe-commits
mailing list