From 0590f4264010a852dc22c9afa16a7df4d004c19a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 11 Jan 2013 15:29:34 -0800 Subject: Replace DepLibs bitcode record with metadata It keeps the same Module interface as the existing/old deplibs feature, but populates the library list from the metadata after reading the bitcode/LL into the Module. Keeping the same module interface will allow us to keep the existing uses (e.g. in the gold plugin) as they are. Internally it still uses the LibraryList variable, but uses it basically as a cache backed by the metadata. BUG= Review URL: https://codereview.chromium.org/11615013 --- lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Bitcode/Reader') diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 6098c1d61c..95650c5260 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2999,6 +2999,8 @@ Module *llvm::getLazyBitcodeModule(MemoryBuffer *Buffer, R->materializeForwardReferencedFunctions(); + M->convertMetadataToLibraryList(); // @LOCALMOD + return M; } @@ -3020,6 +3022,8 @@ Module *llvm::getStreamedBitcodeModule(const std::string &name, R->materializeForwardReferencedFunctions(); + M->convertMetadataToLibraryList(); // @LOCALMOD + return M; } -- cgit v1.2.3-70-g09d2