Add a wrapper for extraction of the dependent libraries from a bytecode

file.

llvm-svn: 16037
This commit is contained in:
Reid Spencer 2004-08-24 22:46:20 +00:00
parent 4691dfb9ba
commit 2d1ee6c0d5

View File

@ -331,4 +331,18 @@ Module* llvm::AnalyzeBytecodeBuffer(
}
}
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