Lines Matching refs:ObjectFile
17 #include "llvm/Object/ObjectFile.h"
22 inline ObjectFile *unwrap(LLVMObjectFileRef OF) {
23 return reinterpret_cast<ObjectFile*>(OF);
26 inline LLVMObjectFileRef wrap(const ObjectFile *OF) {
27 return reinterpret_cast<LLVMObjectFileRef>(const_cast<ObjectFile*>(OF));
60 // ObjectFile creation
63 ErrorOr<ObjectFile *> ObjOrErr(ObjectFile::createObjectFile(Buf));
65 ObjectFile *Obj = ObjOrErr ? ObjOrErr.get() : nullptr;
69 void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile) {
70 delete unwrap(ObjectFile);
73 // ObjectFile Section iterators
74 LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile) {
75 section_iterator SI = unwrap(ObjectFile)->section_begin();
83 LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
85 return (*unwrap(SI) == unwrap(ObjectFile)->section_end()) ? 1 : 0;
98 // ObjectFile Symbol iterators
99 LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
100 symbol_iterator SI = unwrap(ObjectFile)->symbol_begin();
108 LLVMBool LLVMIsSymbolIteratorAtEnd(LLVMObjectFileRef ObjectFile,
110 return (*unwrap(SI) == unwrap(ObjectFile)->symbol_end()) ? 1 : 0;