[llvm-commits] [llvm-gcc-4.2] r123532 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sat Jan 15 00:24:15 PST 2011
Author: rafael
Date: Sat Jan 15 02:24:15 2011
New Revision: 123532
URL: http://llvm.org/viewvc/llvm-project?rev=123532&view=rev
Log:
Add unnamed_addr to declarations.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=123532&r1=123531&r2=123532&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sat Jan 15 02:24:15 2011
@@ -1169,6 +1169,7 @@
AliaseeName, TheModule);
else
assert(0 && "Unsuported global value");
+ Aliasee->setUnnamedAddr(true);
} else {
error ("%J%qD aliased to undefined symbol %qs", decl, decl, AliaseeName);
timevar_pop(TV_LLVM_GLOBALS);
@@ -1767,6 +1768,7 @@
GV = new GlobalVariable(*TheModule, Ty, false,
GlobalValue::ExternalLinkage, 0, Name);
+ GV->setUnnamedAddr(true);
// Check for external weak linkage.
if (DECL_EXTERNAL(decl) && DECL_WEAK(decl))
GV->setLinkage(GlobalValue::ExternalWeakLinkage);
More information about the llvm-commits
mailing list