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.
| 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 | |
| 104 | private: |
| 105 | std::set<StringRef> _moduleNames; |
nothing calls this directly
no outgoing calls
no test coverage detected