| 123 | } |
| 124 | |
| 125 | void getUnitPathForOutputFile(StringRef unitsPath, StringRef filePath, |
| 126 | SmallVectorImpl<char> &str, |
| 127 | const PathRemapper &clangPathRemapper, |
| 128 | FileManager &fileMgr) { |
| 129 | str.append(unitsPath.begin(), unitsPath.end()); |
| 130 | str.push_back('/'); |
| 131 | SmallString<256> absPath(filePath); |
| 132 | fileMgr.makeAbsolutePath(absPath); |
| 133 | StringRef fname = sys::path::filename(absPath); |
| 134 | str.append(fname.begin(), fname.end()); |
| 135 | str.push_back('-'); |
| 136 | clangPathRemapper.remapPath(absPath); |
| 137 | uint64_t pathHashVal = llvm::xxh3_64bits(absPath); |
| 138 | llvm::APInt(64, pathHashVal).toStringUnsigned(str, /*Radix*/ 36); |
| 139 | } |
| 140 | |
| 141 | std::optional<bool> |
| 142 | isUnitUpToDateForOutputFile(StringRef unitsPath, StringRef filePath, |
no outgoing calls
no test coverage detected