MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / fixPathForLLVM

Function fixPathForLLVM

tools/objdump/objdump.cpp:52–55  ·  view source on GitHub ↗

Removes trailing '/' from `input`. A behavior difference has been observed between libc++ implementations. Fixing path to prevent this edge case to be reached. (https://github.com/llvm/llvm-project/issues/60634)

Source from the content-addressed store, hash-verified

50// Fixing path to prevent this edge case to be reached.
51// (https://github.com/llvm/llvm-project/issues/60634)
52std::string fixPathForLLVM(std::string input) {
53 while (!input.empty() && input.back() == '/') input.resize(input.size() - 1);
54 return input;
55}
56
57// Write each HLSL file described in `sources` in a file in `outdirPath`.
58// Doesn't ovewrite existing files, unless `overwrite` is set to true. The

Callers 1

OutputSourceFilesFunction · 0.85

Calls 4

backMethod · 0.80
resizeMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected