summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
-rw-r--r--clang/test/CodeGen/weak-global.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 525c13fc96b..0b7d30ac500 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -500,7 +500,7 @@ void CodeGenModule::EmitGlobalVarInit(const VarDecl *D) {
assert(0 && "Can't have auto or register globals");
case VarDecl::None:
if (!D->getInit())
- GV->setLinkage(llvm::GlobalVariable::WeakLinkage);
+ GV->setLinkage(llvm::GlobalVariable::CommonLinkage);
break;
case VarDecl::Extern:
case VarDecl::PrivateExtern:
diff --git a/clang/test/CodeGen/weak-global.c b/clang/test/CodeGen/weak-global.c
index 86e551c1ead..d19dd612917 100644
--- a/clang/test/CodeGen/weak-global.c
+++ b/clang/test/CodeGen/weak-global.c
@@ -1,3 +1,3 @@
-// RUN: clang -emit-llvm < %s | grep weak
+// RUN: clang -emit-llvm < %s | grep common
int i;
OpenPOWER on IntegriCloud