Lines Matching refs:unwrap
24 inline OwningBinary<ObjectFile> *unwrap(LLVMObjectFileRef OF) { in unwrap() function
33 inline section_iterator *unwrap(LLVMSectionIteratorRef SI) { in unwrap() function
43 inline symbol_iterator *unwrap(LLVMSymbolIteratorRef SI) { in unwrap() function
53 inline relocation_iterator *unwrap(LLVMRelocationIteratorRef SI) { in unwrap() function
68 auto maybeContext = Context ? unwrap(Context) : nullptr; in LLVMCreateBinary()
70 createBinary(unwrap(MemBuf)->getMemBufferRef(), maybeContext)); in LLVMCreateBinary()
80 auto Buf = unwrap(BR)->getMemoryBufferRef(); in LLVMBinaryCopyMemoryBuffer()
87 delete unwrap(BR); in LLVMDisposeBinary()
135 return BinaryTypeMapper::mapBinaryTypeToLLVMBinaryType(unwrap(BR)->getType()); in LLVMBinaryGetType()
142 auto universal = cast<MachOUniversalBinary>(unwrap(BR)); in LLVMMachOUniversalBinaryCopyObjectForArch()
153 auto OF = cast<ObjectFile>(unwrap(BR)); in LLVMObjectFileCopySectionIterator()
162 auto OF = cast<ObjectFile>(unwrap(BR)); in LLVMObjectFileIsSectionIteratorAtEnd()
163 return (*unwrap(SI) == OF->section_end()) ? 1 : 0; in LLVMObjectFileIsSectionIteratorAtEnd()
167 auto OF = cast<ObjectFile>(unwrap(BR)); in LLVMObjectFileCopySymbolIterator()
176 auto OF = cast<ObjectFile>(unwrap(BR)); in LLVMObjectFileIsSymbolIteratorAtEnd()
177 return (*unwrap(SI) == OF->symbol_end()) ? 1 : 0; in LLVMObjectFileIsSymbolIteratorAtEnd()
182 std::unique_ptr<MemoryBuffer> Buf(unwrap(MemBuf)); in LLVMCreateObjectFile()
197 delete unwrap(ObjectFile); in LLVMDisposeObjectFile()
202 OwningBinary<ObjectFile> *OB = unwrap(OF); in LLVMGetSections()
208 delete unwrap(SI); in LLVMDisposeSectionIterator()
213 OwningBinary<ObjectFile> *OB = unwrap(OF); in LLVMIsSectionIteratorAtEnd()
214 return (*unwrap(SI) == OB->getBinary()->section_end()) ? 1 : 0; in LLVMIsSectionIteratorAtEnd()
218 ++(*unwrap(SI)); in LLVMMoveToNextSection()
223 Expected<section_iterator> SecOrErr = (*unwrap(Sym))->getSection(); in LLVMMoveToContainingSection()
230 *unwrap(Sect) = *SecOrErr; in LLVMMoveToContainingSection()
235 OwningBinary<ObjectFile> *OB = unwrap(OF); in LLVMGetSymbols()
241 delete unwrap(SI); in LLVMDisposeSymbolIterator()
246 OwningBinary<ObjectFile> *OB = unwrap(OF); in LLVMIsSymbolIteratorAtEnd()
247 return (*unwrap(SI) == OB->getBinary()->symbol_end()) ? 1 : 0; in LLVMIsSymbolIteratorAtEnd()
251 ++(*unwrap(SI)); in LLVMMoveToNextSymbol()
256 auto NameOrErr = (*unwrap(SI))->getName(); in LLVMGetSectionName()
263 return (*unwrap(SI))->getSize(); in LLVMGetSectionSize()
267 if (Expected<StringRef> E = (*unwrap(SI))->getContents()) in LLVMGetSectionContents()
274 return (*unwrap(SI))->getAddress(); in LLVMGetSectionAddress()
279 return (*unwrap(SI))->containsSymbol(**unwrap(Sym)); in LLVMGetSectionContainsSymbol()
284 relocation_iterator SI = (*unwrap(Section))->relocation_begin(); in LLVMGetRelocations()
289 delete unwrap(SI); in LLVMDisposeRelocationIterator()
294 return (*unwrap(SI) == (*unwrap(Section))->relocation_end()) ? 1 : 0; in LLVMIsRelocationIteratorAtEnd()
298 ++(*unwrap(SI)); in LLVMMoveToNextRelocation()
304 Expected<StringRef> Ret = (*unwrap(SI))->getName(); in LLVMGetSymbolName()
315 Expected<uint64_t> Ret = (*unwrap(SI))->getAddress(); in LLVMGetSymbolAddress()
326 return (*unwrap(SI))->getCommonSize(); in LLVMGetSymbolSize()
331 return (*unwrap(RI))->getOffset(); in LLVMGetRelocationOffset()
335 symbol_iterator ret = (*unwrap(RI))->getSymbol(); in LLVMGetRelocationSymbol()
340 return (*unwrap(RI))->getType(); in LLVMGetRelocationType()
346 (*unwrap(RI))->getTypeName(ret); in LLVMGetRelocationTypeName()