[lld] [LLD][COFF] Factor out addObjectFile (PR #206811)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 05:21:20 PDT 2026
================
@@ -262,21 +262,27 @@ MemoryBufferRef LinkerDriver::takeBuffer(std::unique_ptr<MemoryBuffer> mb) {
return mbref;
}
-static InputFile *tryCreateFatLTOFile(COFFLinkerContext &ctx,
- MemoryBufferRef mb, StringRef archiveName,
- uint64_t offsetInArchive, bool lazy) {
+InputFile *LinkerDriver::addObjectFile(COFFLinkerContext &ctx,
+ MemoryBufferRef mb,
+ StringRef archiveName,
+ uint64_t offsetInArchive, bool lazy) {
+ std::unique_ptr<COFFObjectFile> coffObj = ObjFile::createCOFFObject(ctx, mb);
+ InputFile *obj = nullptr;
+
if (ctx.config.fatLTOObjects) {
Expected<MemoryBufferRef> fatLTOData =
- IRObjectFile::findBitcodeInMemBuffer(mb);
----------------
cjacek wrote:
Clarified and merged, thanks!
https://github.com/llvm/llvm-project/pull/206811
More information about the llvm-commits
mailing list