projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the merging of the constantness of declarations.
[oota-llvm.git]
/
lib
/
Linker
/
LinkModules.cpp
diff --git
a/lib/Linker/LinkModules.cpp
b/lib/Linker/LinkModules.cpp
index 403a1ff90c598c6c1a37066e3b42a14268f2d782..2692ec97b7826f32c94c5b7987b8a85b472ba8cc 100644
(file)
--- a/
lib/Linker/LinkModules.cpp
+++ b/
lib/Linker/LinkModules.cpp
@@
-1052,9
+1052,8
@@
bool ModuleLinker::linkGlobalProto(GlobalVariable *SGV) {
if (GlobalVariable *DGVar = dyn_cast<GlobalVariable>(DGV)) {
DGVar->setAlignment(Alignment);
if (GlobalVariable *DGVar = dyn_cast<GlobalVariable>(DGV)) {
DGVar->setAlignment(Alignment);
- if (DGVar->isDeclaration() && SGV->isConstant() &&
- !DGVar->isConstant())
- DGVar->setConstant(true);
+ if (DGVar->isDeclaration() && !SGV->isConstant())
+ DGVar->setConstant(false);
}
// Set calculated linkage, visibility and unnamed_addr.
}
// Set calculated linkage, visibility and unnamed_addr.