[cfe-commits] r123681 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGen/annotate.c
Rafael Espindola
rafael.espindola at gmail.com
Mon Jan 17 14:22:52 PST 2011
Author: rafael
Date: Mon Jan 17 16:22:52 2011
New Revision: 123681
URL: http://llvm.org/viewvc/llvm-project?rev=123681&view=rev
Log:
More unnamed_addr.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/test/CodeGen/annotate.c
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=123681&r1=123680&r2=123681&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jan 17 16:22:52 2011
@@ -630,6 +630,7 @@
new llvm::GlobalVariable(*M, unit->getType(), false,
llvm::GlobalValue::PrivateLinkage, unit,
".str");
+ unitGV->setUnnamedAddr(true);
// Create the ConstantStruct for the global annotation.
llvm::Constant *Fields[4] = {
Modified: cfe/trunk/test/CodeGen/annotate.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/annotate.c?rev=123681&r1=123680&r2=123681&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/annotate.c (original)
+++ cfe/trunk/test/CodeGen/annotate.c Mon Jan 17 16:22:52 2011
@@ -5,4 +5,6 @@
__attribute__((annotate("bar"))) static char bar;
}
+// CHECK: private unnamed_addr global
+// CHECK: private unnamed_addr global
// CHECK: @llvm.global.annotations = appending global [2 x %0]
More information about the cfe-commits
mailing list