forked from OSchip/llvm-project
Bind libObject API for obtaining the section containing a Symbol.
llvm-svn: 142667
This commit is contained in:
parent
c20905110a
commit
07bfdbb233
|
@ -43,6 +43,8 @@ void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);
|
|||
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
|
||||
LLVMSectionIteratorRef SI);
|
||||
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
|
||||
void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect,
|
||||
LLVMSymbolIteratorRef Sym);
|
||||
|
||||
// ObjectFile Symbol iterators
|
||||
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile);
|
||||
|
|
|
@ -48,6 +48,12 @@ void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) {
|
|||
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
|
||||
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
|
||||
symbol_iterator SI = unwrap(ObjectFile)->begin_symbols();
|
||||
|
|
Loading…
Reference in New Issue