================
@@ -21,6 +21,16 @@ using namespace clang;
 using namespace tooling;
 using namespace dependencies;
 
+void ModuleDeps::forEachFileDep(llvm::function_ref<void(StringRef)> Cb) const {
+  SmallString<0> PathBuf;
+  PathBuf.reserve(256);
----------------
jansvoboda11 wrote:

Curious what people think of having the caller provide this. If the caller used 
the same buffer for multiple `ModuleDeps` objects, we could avoid even more 
allocations. I haven't tested the perf of that scheme.

https://github.com/llvm/llvm-project/pull/114457
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to