MCPcopy Create free account
hub / github.com/aguinet/dragonffi / getPtrPortableFormatDescriptor

Function getPtrPortableFormatDescriptor

bindings/python/cobj.cpp:419–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419std::string getPtrPortableFormatDescriptor(PointerType const* PTy)
420{
421 const auto Size = PTy->getSize();
422 switch (Size) {
423 case 1:
424 return "B";
425 case 2:
426 return "H";
427 case 4:
428 return "I";
429 case 8:
430 return "Q";
431 default:
432 break;
433 }
434 return std::to_string(Size) + "B";
435}
436
437template <class BTyFunc, class PtrTyFunc>
438std::string getFormatDescriptorImpl(Type const* Ty, BTyFunc BTyFormat, PtrTyFunc PtrTyFormat)

Callers

nothing calls this directly

Calls 1

getSizeMethod · 0.45

Tested by

no test coverage detected