From 51c962f72e9569d54dc9c853abf99e2c34fc41cf Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 17 Mar 2017 22:17:24 +0000 Subject: Add !associated metadata. This is an ELF-specific thing that adds SHF_LINK_ORDER to the global's section pointing to the metadata argument's section. The effect of that is a reverse dependency between sections for the linker GC. !associated does not change the behavior of global-dce. The global may also need to be added to llvm.compiler.used. Since SHF_LINK_ORDER is per-section, !associated effectively enables fdata-sections for the affected globals, the same as comdats do. Differential Revision: https://reviews.llvm.org/D29104 llvm-svn: 298157 --- llvm/lib/IR/LLVMContext.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/IR') diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index dd66f144f04..6c6383c2225 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -58,6 +58,7 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { {MD_type, "type"}, {MD_section_prefix, "section_prefix"}, {MD_absolute_symbol, "absolute_symbol"}, + {MD_associated, "associated"}, }; for (auto &MDKind : MDKinds) { -- cgit v1.2.3