aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/gold
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2023-07-20 20:58:22 +0000
committerPaul Kirth <paulkirth@google.com>2023-08-18 22:56:48 +0000
commit6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd (patch)
treea2da40c25cf4dbfa5c061bd98795ea4bec519c6c /llvm/tools/gold
parent14e3bec8fc3e1f10c3dc57277ae3dbf9a4087b1c (diff)
downloadllvm-6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd.zip
llvm-6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd.tar.gz
llvm-6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd.tar.bz2
Reland "[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. Reviewed By: MaskRay, nikic 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);