mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
Bind libObject API for obtaining the section containing a Symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,6 +43,8 @@ void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);
|
|||||||
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
|
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
|
||||||
LLVMSectionIteratorRef SI);
|
LLVMSectionIteratorRef SI);
|
||||||
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
|
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
|
||||||
|
void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect,
|
||||||
|
LLVMSymbolIteratorRef Sym);
|
||||||
|
|
||||||
// ObjectFile Symbol iterators
|
// ObjectFile Symbol iterators
|
||||||
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile);
|
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile);
|
||||||
|
@@ -48,6 +48,12 @@ void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) {
|
|||||||
if (ec) report_fatal_error("LLVMMoveToNextSection failed: " + ec.message());
|
if (ec) report_fatal_error("LLVMMoveToNextSection failed: " + ec.message());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect,
|
||||||
|
LLVMSymbolIteratorRef Sym) {
|
||||||
|
if (error_code ec = (*unwrap(Sym))->getSection(*unwrap(Sect)))
|
||||||
|
report_fatal_error(ec.message());
|
||||||
|
}
|
||||||
|
|
||||||
// ObjectFile Symbol iterators
|
// ObjectFile Symbol iterators
|
||||||
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
|
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
|
||||||
symbol_iterator SI = unwrap(ObjectFile)->begin_symbols();
|
symbol_iterator SI = unwrap(ObjectFile)->begin_symbols();
|
||||||
|
Reference in New Issue
Block a user