[Lldb-commits] [PATCH] D45977: Always normalize FileSpec paths.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 25 00:54:46 PDT 2018


labath added a comment.

This code itself looks fine, I have just two minor comments.

However, I do have a question about performance. I remember us being very worried about performance in the past, so we ended up putting in this like r298876. This removes the normalization step during FileSpec comparison, but it introduces mandatory normalization upon every FileSpec creation, so it's not obvious to me what will this do to performance. Should we try to benchmark this somehow?

Jim, you seem to have encountered a case when the normalization was a bottleneck (r298876). Do you remember what situation was that in?



================
Comment at: source/Utility/FileSpec.cpp:245
 
+  llvm::StringRef resolve_path_ref2(resolved.c_str());
+
----------------
It looks like this is unused.


================
Comment at: source/Utility/FileSpec.cpp:269-270
+  else {
+    // Make sure we don't end up with "." in both the directory and filename.
+    // If we do, clear the directory. 
+    m_filename.SetString(".");
----------------
`remove_dots` should never produce a path like this, so we should be able to revert this now.


https://reviews.llvm.org/D45977





More information about the lldb-commits mailing list