mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Add relocation iterators to the libObject C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -112,6 +112,29 @@ LLVMBool LLVMGetSectionContainsSymbol(LLVMSectionIteratorRef SI,
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Section Relocation iterators
|
||||
LLVMRelocationIteratorRef LLVMGetRelocations(LLVMSectionIteratorRef Section) {
|
||||
relocation_iterator SI = (*unwrap(Section))->begin_relocations();
|
||||
return wrap(new relocation_iterator(SI));
|
||||
}
|
||||
|
||||
void LLVMDisposeRelocationIterator(LLVMRelocationIteratorRef SI) {
|
||||
delete unwrap(SI);
|
||||
}
|
||||
|
||||
LLVMBool LLVMIsRelocationIteratorAtEnd(LLVMSectionIteratorRef Section,
|
||||
LLVMRelocationIteratorRef SI) {
|
||||
return (*unwrap(SI) == (*unwrap(Section))->end_relocations()) ? 1 : 0;
|
||||
}
|
||||
|
||||
void LLVMMoveToNextRelocation(LLVMRelocationIteratorRef SI) {
|
||||
error_code ec;
|
||||
unwrap(SI)->increment(ec);
|
||||
if (ec) report_fatal_error("LLVMMoveToNextRelocation failed: " +
|
||||
ec.message());
|
||||
}
|
||||
|
||||
|
||||
// SymbolRef accessors
|
||||
const char *LLVMGetSymbolName(LLVMSymbolIteratorRef SI) {
|
||||
StringRef ret;
|
||||
|
Reference in New Issue
Block a user