[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
Reid Spencer
reid at x10sys.com
Tue Aug 24 15:46:30 PDT 2004
Changes in directory llvm/lib/Bytecode/Reader:
ReaderWrappers.cpp updated: 1.27 -> 1.28
---
Log message:
Add a wrapper for extraction of the dependent libraries from a bytecode
file.
---
Diffs of the changes: (+14 -0)
Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.27 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.28
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.27 Sat Aug 21 15:52:03 2004
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Tue Aug 24 17:46:20 2004
@@ -331,4 +331,18 @@
}
}
+bool llvm::GetBytecodeDependentLibraries(const std::string &fname,
+ std::vector<std::string>& deplibs) {
+ try {
+ std::auto_ptr<ModuleProvider> AMP( getBytecodeModuleProvider(fname));
+ Module* M = AMP->releaseModule();
+ deplibs = M->getLibraries();
+ delete M;
+ return true;
+ } catch (...) {
+ deplibs.clear();
+ return false;
+ }
+}
+
// vim: sw=2 ai
More information about the llvm-commits
mailing list