aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-07-05 12:55:36 -0400
committerJoseph Huber <jhuber6@vols.utk.edu>2022-07-07 12:20:40 -0400
commit41fba3c107a5bc99065f3bf8b9f5b9d52eab2d98 (patch)
treea2b027cacc1b9119e227776a3de7828e469561f9 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent82a0adf0f78d5be8a727d9537627e2a6f7e8e105 (diff)
downloadllvm-41fba3c107a5bc99065f3bf8b9f5b9d52eab2d98.zip
llvm-41fba3c107a5bc99065f3bf8b9f5b9d52eab2d98.tar.gz
llvm-41fba3c107a5bc99065f3bf8b9f5b9d52eab2d98.tar.bz2
[Metadata] Add 'exclude' metadata to add the exclude flags on globals
This patchs adds a new metadata kind `exclude` which implies that the global variable should be given the necessary flags during code generation to not be included in the final executable. This is done using the ``SHF_EXCLUDE`` flag on ELF for example. This should make it easier to specify this flag on a variable without needing to explicitly check the section name in the target backend. Depends on D129053 D129052 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D129151
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index dbac474..2badbe3 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -449,9 +449,6 @@ static SectionKind getELFKindForNamedSection(StringRef Name, SectionKind K) {
Name == ".llvmbc" || Name == ".llvmcmd")
return SectionKind::getMetadata();
- if (Name == ".llvm.offloading")
- return SectionKind::getExclude();
-
if (Name.empty() || Name[0] != '.') return K;
// Default implementation based on some magic section names.