[PATCH] LTO: expose LTO_SYMBOL_DEFINITION_COMDAT flag, which indicates that the definition is part of a comdat group.
Peter Collingbourne
peter at pcc.me.uk
Mon Jun 8 16:47:39 PDT 2015
Hi rafael,
http://reviews.llvm.org/D10330
Files:
include/llvm-c/lto.h
lib/LTO/LTOModule.cpp
Index: include/llvm-c/lto.h
===================================================================
--- include/llvm-c/lto.h
+++ include/llvm-c/lto.h
@@ -57,6 +57,7 @@
LTO_SYMBOL_DEFINITION_WEAK = 0x00000300,
LTO_SYMBOL_DEFINITION_UNDEFINED = 0x00000400,
LTO_SYMBOL_DEFINITION_WEAKUNDEF = 0x00000500,
+ LTO_SYMBOL_DEFINITION_COMDAT = 0x00000600,
LTO_SYMBOL_SCOPE_MASK = 0x00003800,
LTO_SYMBOL_SCOPE_INTERNAL = 0x00000800,
LTO_SYMBOL_SCOPE_HIDDEN = 0x00001000,
Index: lib/LTO/LTOModule.cpp
===================================================================
--- lib/LTO/LTOModule.cpp
+++ lib/LTO/LTOModule.cpp
@@ -448,7 +448,9 @@
}
// set definition part
- if (def->hasWeakLinkage() || def->hasLinkOnceLinkage())
+ if (def->hasComdat())
+ attr |= LTO_SYMBOL_DEFINITION_COMDAT;
+ else if (def->hasWeakLinkage() || def->hasLinkOnceLinkage())
attr |= LTO_SYMBOL_DEFINITION_WEAK;
else if (def->hasCommonLinkage())
attr |= LTO_SYMBOL_DEFINITION_TENTATIVE;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10330.27350.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150608/119e5ecc/attachment.bin>
More information about the llvm-commits
mailing list