diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-16 17:19:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-16 17:19:34 +0000 |
commit | cba4c33949d991b50bd83988d1e0bfe1beb12420 (patch) | |
tree | 1cd6645ffbfabd39f21afed1dfa30da05e1bb9c6 /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | 751677a0409ed782d44c4e98f14bf52479911c23 (diff) | |
download | llvm-cba4c33949d991b50bd83988d1e0bfe1beb12420.zip llvm-cba4c33949d991b50bd83988d1e0bfe1beb12420.tar.gz llvm-cba4c33949d991b50bd83988d1e0bfe1beb12420.tar.bz2 |
Only put unnamed_addr constants in mergeable sections. Fixes PR8297.
llvm-svn: 123585
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 0e67fe5..eab43fb 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -162,7 +162,7 @@ SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV, // If the global is marked constant, we can put it into a mergable section, // a mergable string section, or general .data if it contains relocations. - if (GVar->isConstant()) { + if (GVar->isConstant() && GVar->hasUnnamedAddr()) { // If the initializer for the global contains something that requires a // relocation, then we may have to drop this into a wriable data section // even though it is marked const. |