aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-27 22:32:55 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-27 22:32:55 +0000
commit460980d3b9d045288041bf8b826899795c60ca1d (patch)
tree2174d7b3015f0a4b6dd7408b1ac220e9d021973e /lib
parentb0dd6702ab5e7f53a4bdab5a3371285ad2a4b20b (diff)
Add unnamed_addr to internal globals which are only used as an operand to memcpy. (Spotted by looking at IR.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/CGDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 0e1054affd..9991b302b2 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -742,6 +742,7 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) {
llvm::GlobalValue::InternalLinkage,
constant, Name, 0, false, 0);
GV->setAlignment(alignment.getQuantity());
+ GV->setUnnamedAddr(true);
llvm::Value *SrcPtr = GV;
if (SrcPtr->getType() != BP)