mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
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:
parent
3120e714e6
commit
e0cf59e52f
@ -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