llvm-project
34d2a6d3 - [clang] Specialize invocation path visitation to the cow (#205686)

Commit
3 days ago
[clang] Specialize invocation path visitation to the cow (#205686) After https://github.com/llvm/llvm-project/pull/205632, the only clients of the compiler invocation's `visitPaths()` APIs call it on the cow variant. This PR moves the implementation from the base class into the cow, allowing specialized copy-on-write behavior for mutating visitation. If the callback requests a path to be mutated, exclusive ownership of the containing `*Options` instance is established and the string gets modified. This should be performance win for dependency scans using prefix mapping, although admittedly I haven't benchmarked.
Author
Parents
Loading