MCPcopy Create free account
hub / github.com/MobileNativeFoundation/index-import / getModuleInfo

Method getModuleInfo

index-import.cpp:98–102  ·  view source on GitHub ↗

Implementation of ModuleInfoWriterCallback, which is an unusual API. When adding dependencies to Units, the module name is passed not as a string, but instead as an opaque pointer. This callback then maps the opaque pointer to a module name string.

Source from the content-addressed store, hash-verified

96 // but instead as an opaque pointer. This callback then maps the opaque
97 // pointer to a module name string.
98 static ModuleInfo getModuleInfo(OpaqueModule ref, SmallVectorImpl<char> &) {
99 // In this implementation, `mod` is a pointer into `_moduleNames`.
100 auto moduleName = static_cast<const StringRef *>(ref);
101 return {*moduleName};
102 }
103
104private:
105 std::set<StringRef> _moduleNames;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected