summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-13 21:54:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-13 21:54:20 +0000
commitcba833a09d06598f74a8f2ae4c612b1ea092d886 (patch)
treeff6c91c875a48e7d558bd027ccadd873708156cc /llvm/lib/IR/Module.cpp
parent794e6a60a8ceab3781a8b99952f24592a4a9c007 (diff)
downloadbcm5719-llvm-cba833a09d06598f74a8f2ae4c612b1ea092d886.tar.gz
bcm5719-llvm-cba833a09d06598f74a8f2ae4c612b1ea092d886.zip
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 :-) llvm-svn: 232221
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 3a88db9754a..3e8f91fee74 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -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.
//
OpenPOWER on IntegriCloud