[PATCH] D141342: [perf-training] Check extension in findFilesWithExtension

Amir Ayupov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 11:46:59 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1fbbf92e4fda: [perf-training] Check extension in findFilesWithExtension (authored by Amir).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141342

Files:
  clang/utils/perf-training/perf-helper.py


Index: clang/utils/perf-training/perf-helper.py
===================================================================
--- clang/utils/perf-training/perf-helper.py
+++ clang/utils/perf-training/perf-helper.py
@@ -23,7 +23,7 @@
   filenames = []
   for root, dirs, files in os.walk(path): 
     for filename in files:
-      if filename.endswith(extension):
+      if os.path.splitext(filename)[1] == extension:
         filenames.append(os.path.join(root, filename))
   return filenames
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141342.487915.patch
Type: text/x-patch
Size: 486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230110/b3964472/attachment-0001.bin>


More information about the cfe-commits mailing list