LTO: expose LTO_SYMBOL_COMDAT flag, which indicates that the definition is part of a comdat group.
Reviewers: rafael
Subscribers: llvm-commits, ruiu
Differential Revision: http://reviews.llvm.org/D10330
llvm-svn: 239559
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 5cdbca6..0794d3c 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -468,6 +468,9 @@
else
attr |= LTO_SYMBOL_SCOPE_DEFAULT;
+ if (def->hasComdat())
+ attr |= LTO_SYMBOL_COMDAT;
+
auto Iter = _defines.insert(Name).first;
// fill information structure