aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/gold
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2023-06-13 21:39:14 +0000
committerPaul Kirth <paulkirth@google.com>2023-07-19 23:07:45 +0000
commit421e4026111315d002879b1e7a0cf3aacd00f488 (patch)
treeabf3699b6512eb08fd0d2b89ca81f64d3fdd51e3 /llvm/tools/gold
parent3a45b843dec1bca195884aa1c5bc56bd0e6755b4 (diff)
downloadllvm-421e4026111315d002879b1e7a0cf3aacd00f488.zip
llvm-421e4026111315d002879b1e7a0cf3aacd00f488.tar.gz
llvm-421e4026111315d002879b1e7a0cf3aacd00f488.tar.bz2
[gold] Add preliminary FatLTO support to the Gold plugin
This changes the definition if `isSectionBitcode` to only be valid for the `.llvm.lto` section, since this API is only called from LTO, and the `.llvmbc` section was not intended to be used for LTO. This allows the gold plugin to keep its existing behavior without introducing any significant changes. Depends on D146778 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D152973
Diffstat (limited to 'llvm/tools/gold')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index a47dba3..59bd3f6 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -538,14 +538,6 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
BufferRef = Buffer->getMemBufferRef();
}
- // Only use bitcode files for LTO. InputFile::create() will load bitcode
- // from the .llvmbc section within a binary object, this bitcode is typically
- // generated by -fembed-bitcode and is not to be used by LLVMgold.so for LTO.
- if (identify_magic(BufferRef.getBuffer()) != file_magic::bitcode) {
- *claimed = 0;
- return LDPS_OK;
- }
-
*claimed = 1;
Expected<std::unique_ptr<InputFile>> ObjOrErr = InputFile::create(BufferRef);