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

file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-08-24 22:46:20 +00:00
parent 3120e714e6
commit e0cf59e52f

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