mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Changes necessary to enable linking of archives without LLVM symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -391,26 +391,27 @@ bool llvm::GetBytecodeSymbols(const sys::Path& fName,
|
||||
}
|
||||
}
|
||||
|
||||
bool llvm::GetBytecodeSymbols(const unsigned char*Buffer, unsigned Length,
|
||||
ModuleProvider*
|
||||
llvm::GetBytecodeSymbols(const unsigned char*Buffer, unsigned Length,
|
||||
const std::string& ModuleID,
|
||||
std::vector<std::string>& symbols) {
|
||||
|
||||
try {
|
||||
std::auto_ptr<ModuleProvider>
|
||||
AMP(getBytecodeBufferModuleProvider(Buffer, Length, ModuleID));
|
||||
ModuleProvider* MP =
|
||||
getBytecodeBufferModuleProvider(Buffer, Length, ModuleID);
|
||||
|
||||
// Get the module from the provider
|
||||
Module* M = AMP->releaseModule();
|
||||
Module* M = MP->materializeModule();
|
||||
|
||||
// Get the symbols
|
||||
getSymbols(M, symbols);
|
||||
|
||||
// Done with the module
|
||||
delete M;
|
||||
return true;
|
||||
return MP;
|
||||
|
||||
} catch (...) {
|
||||
return false;
|
||||
// Fall through
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// vim: sw=2 ai
|
||||
|
Reference in New Issue
Block a user