// ObjectFile creation
LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf) {
ErrorOr<ObjectFile*> ObjOrErr(ObjectFile::createObjectFile(unwrap(MemBuf)));
- ObjectFile *Obj = ObjOrErr ? ObjOrErr.get() : 0;
+ ObjectFile *Obj = ObjOrErr ? ObjOrErr.get() : nullptr;
return wrap(Obj);
}
// ObjectFile Section iterators
LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile) {
- section_iterator SI = unwrap(ObjectFile)->begin_sections();
+ section_iterator SI = unwrap(ObjectFile)->section_begin();
return wrap(new section_iterator(SI));
}
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSectionIteratorRef SI) {
- return (*unwrap(SI) == unwrap(ObjectFile)->end_sections()) ? 1 : 0;
+ return (*unwrap(SI) == unwrap(ObjectFile)->section_end()) ? 1 : 0;
}
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) {
// ObjectFile Symbol iterators
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
- symbol_iterator SI = unwrap(ObjectFile)->begin_symbols();
+ symbol_iterator SI = unwrap(ObjectFile)->symbol_begin();
return wrap(new symbol_iterator(SI));
}
LLVMBool LLVMIsSymbolIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSymbolIteratorRef SI) {
- return (*unwrap(SI) == unwrap(ObjectFile)->end_symbols()) ? 1 : 0;
+ return (*unwrap(SI) == unwrap(ObjectFile)->symbol_end()) ? 1 : 0;
}
void LLVMMoveToNextSymbol(LLVMSymbolIteratorRef SI) {
// Section Relocation iterators
LLVMRelocationIteratorRef LLVMGetRelocations(LLVMSectionIteratorRef Section) {
- relocation_iterator SI = (*unwrap(Section))->begin_relocations();
+ relocation_iterator SI = (*unwrap(Section))->relocation_begin();
return wrap(new relocation_iterator(SI));
}
LLVMBool LLVMIsRelocationIteratorAtEnd(LLVMSectionIteratorRef Section,
LLVMRelocationIteratorRef SI) {
- return (*unwrap(SI) == (*unwrap(Section))->end_relocations()) ? 1 : 0;
+ return (*unwrap(SI) == (*unwrap(Section))->relocation_end()) ? 1 : 0;
}
void LLVMMoveToNextRelocation(LLVMRelocationIteratorRef SI) {
return ret;
}
-uint64_t LLVMGetSymbolFileOffset(LLVMSymbolIteratorRef SI) {
- uint64_t ret;
- if (error_code ec = (*unwrap(SI))->getFileOffset(ret))
- report_fatal_error(ec.message());
- return ret;
-}
-
uint64_t LLVMGetSymbolSize(LLVMSymbolIteratorRef SI) {
uint64_t ret;
if (error_code ec = (*unwrap(SI))->getSize(ret))