Be lazy about loading metadata in IRObjectFile.

This speeds up llvm-ar building lib64/libclangSema.a with debug IR files
from 8.658015807 seconds to just 0.351036519 seconds :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232221 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-03-13 21:54:20 +00:00
parent fbbc2cc358
commit dc6141a4ff
6 changed files with 15 additions and 2 deletions

View File

@ -413,6 +413,12 @@ std::error_code Module::materializeAllPermanently() {
return std::error_code();
}
std::error_code Module::materializeMetadata() {
if (!Materializer)
return std::error_code();
return Materializer->materializeMetadata();
}
//===----------------------------------------------------------------------===//
// Other module related stuff.
//