Resolution-based LTO API.

Summary:
This introduces a resolution-based LTO API. The main advantage of this API over
existing APIs is that it allows the linker to supply a resolution for each
symbol in each object, rather than the combined object as a whole. This will
become increasingly important for use cases such as ThinLTO which require us
to process symbol resolutions in a more complicated way than just adjusting
linkage.

Patch by Peter Collingbourne.

Reviewers: rafael, tejohnson, mehdi_amini

Subscribers: lhames, tejohnson, mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D20268

Address review comments

llvm-svn: 278330
This commit is contained in:
Teresa Johnson
2016-08-11 12:56:40 +00:00
parent 5c91764af5
commit f99573b3ee
37 changed files with 2055 additions and 1052 deletions

View File

@@ -324,5 +324,5 @@ llvm::object::IRObjectFile::create(MemoryBufferRef Object,
return EC;
std::unique_ptr<Module> &M = MOrErr.get();
return llvm::make_unique<IRObjectFile>(Object, std::move(M));
return llvm::make_unique<IRObjectFile>(BCOrErr.get(), std::move(M));
}