MCPcopy Create free account
hub / github.com/apple/coremltools / makeGuard

Function makeGuard

mlmodel/tools/enumgen.cpp:27–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27static std::string makeGuard(const std::string& filename) {
28 std::stringstream result;
29 std::string upperBasename = basename(filename);
30 for (auto & c: upperBasename) c = std::toupper(c);
31 result << "__" << upperBasename << "_ENUMS_H";
32 return result.str();
33}
34
35// handle enum types inside either a message (Descriptor)
36// or a top level file (FileDescriptor).

Callers 1

makeContentsFunction · 0.85

Calls 2

basenameFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected