OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e49c5
)
[opt-diff] Fix the case when the script is invoked with directories
author
Adam Nemet
<anemet@apple.com>
Mon, 6 Mar 2017 19:15:22 +0000
(19:15 +0000)
committer
Adam Nemet
<anemet@apple.com>
Mon, 6 Mar 2017 19:15:22 +0000
(19:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297055
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/opt-viewer/opt-diff.py
patch
|
blob
|
history
diff --git
a/utils/opt-viewer/opt-diff.py
b/utils/opt-viewer/opt-diff.py
index
c51e05e
..
8c37786
100755
(executable)
--- a/
utils/opt-viewer/opt-diff.py
+++ b/
utils/opt-viewer/opt-diff.py
@@
-21,6
+21,7
@@
import argparse
from collections import defaultdict
from multiprocessing import cpu_count, Pool
import os, os.path
+import fnmatch
def find_files(dir_or_file):
if os.path.isfile(dir_or_file):
@@
-29,7
+30,8
@@
def find_files(dir_or_file):
all = []
for dir, subdirs, files in os.walk(dir_or_file):
for file in files:
- all.append( os.path.join(dir, file))
+ if fnmatch.fnmatch(file, "*.opt.yaml"):
+ all.append( os.path.join(dir, file))
return all
if __name__ == '__main__':