mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Add a wrapper for extraction of the dependent libraries from a bytecode
file. llvm-svn: 16037
This commit is contained in:
parent
4691dfb9ba
commit
2d1ee6c0d5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user