[PATCH] D61743: New clang option -MD-filter=prefix to filter files from make dependencies

Melanie Blower via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 13:59:03 PDT 2019


mibintc marked an inline comment as done.
mibintc added a comment.

added an inline comment about the use of strncmp



================
Comment at: lib/Frontend/DependencyFile.cpp:279
+  if (DependencyFilter.size() &&
+      strncmp(Filename, DependencyFilter.c_str(), DependencyFilter.size()) == 0)
+    // Remove dependencies that are prefixed by the Filter string.
----------------
I wasn't sure about using strncmp to do the prefix comparison, but i checked around in the clang code and saw strncmp used in several places so I thought it would be acceptable. 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61743/new/

https://reviews.llvm.org/D61743





More information about the llvm-commits mailing list