projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[X86][Haswell][SchedModel] Tidy up.
[oota-llvm.git]
/
lib
/
Linker
/
LinkModules.cpp
diff --git
a/lib/Linker/LinkModules.cpp
b/lib/Linker/LinkModules.cpp
index 1970e7fa0697ffe85a8525016942c22599c5d306..5c26b2610b1da78f4554004ecebb6dfeadacb4a6 100644
(file)
--- a/
lib/Linker/LinkModules.cpp
+++ b/
lib/Linker/LinkModules.cpp
@@
-546,6
+546,11
@@
Value *ValueMaterializerTy::materializeValueFor(Value *V) {
SF->getLinkage(), SF->getName(), DstM);
copyGVAttributes(DF, SF);
+ if (Comdat *SC = SF->getComdat()) {
+ Comdat *DC = DstM->getOrInsertComdat(SC->getName());
+ DF->setComdat(DC);
+ }
+
LazilyLinkFunctions.push_back(SF);
return DF;
}