From 421e4026111315d002879b1e7a0cf3aacd00f488 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 13 Jun 2023 21:39:14 +0000 Subject: [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 --- llvm/tools/gold/gold-plugin.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'llvm/tools/gold') 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> ObjOrErr = InputFile::create(BufferRef); -- cgit v1.1