[PATCH] D52033: [GCOV] Add options to filter files which must be instrumented.

calixte via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 09:31:36 PDT 2018


calixte added inline comments.


================
Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:474
+  const StringRef RealFilename =
+      sys::fs::real_path(Filename, RealPath) ? Filename : StringRef(RealPath);
+
----------------
vsk wrote:
> If it's safe to use `Filename` when there's an error getting the real_path, I'm not sure why it's necessary to use the real_path at all. Why not fall back to the default behavior when there's an error?
When compiling Firefox, most of the paths are already absolute paths with two exceptions:
 - /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/***: we need to have real_path here
 - hb-ot-shape-complex-indic-machine.rl: real_path is failing but if the exclude regex is hb.*\.rl we can exclude them


Repository:
  rL LLVM

https://reviews.llvm.org/D52033





More information about the llvm-commits mailing list