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

Method addMapping

src/Common/PlatformFileSystem.cpp:292–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292bool PlatformFileSystem::addMapping(std::string_view what,
293 std::string_view with) {
294 std::filesystem::path original = normalize(what);
295 std::filesystem::path replacement = normalize(with);
296
297 if (!original.is_absolute() || !replacement.is_absolute()) return false;
298
299 Mapping &mapping = m_mappings.emplace_back();
300 mapping.m_what = original.string();
301 mapping.m_with = replacement.string();
302 return true;
303}
304
305std::string PlatformFileSystem::remap(std::string_view what) {
306 for (const Mapping &mapping : m_mappings) {

Callers 2

parseCommandLineMethod · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64