MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / getLeaf

Method getLeaf

src/Common/PlatformFileSystem.cpp:1122–1132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1120}
1121
1122std::pair<SymbolId, std::string_view> PlatformFileSystem::getLeaf(
1123 PathId id, SymbolTable *symbolTable) {
1124 if (!id) return {BadSymbolId, BadRawSymbol};
1125
1126 const std::filesystem::path filepath = toPath(id);
1127 if (!filepath.has_filename()) {
1128 return {BadSymbolId, BadRawSymbol};
1129 }
1130
1131 return symbolTable->add(filepath.filename().string());
1132}
1133
1134std::pair<SymbolId, std::string_view> PlatformFileSystem::getType(
1135 PathId id, SymbolTable *symbolTable) {

Callers 5

TESTFunction · 0.80
reportHtmlMethod · 0.80
checkMethod · 0.80
isFilePrecompiledMethod · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64