summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-09-18 23:14:15 +0000
committerZachary Turner <zturner@google.com>2017-09-18 23:14:15 +0000
commitbbf8f23ed93a79f1427e9b42a197228075d7fe96 (patch)
tree1c826f85bb880b30dec65bdb714eda58fc220f8b /llvm
parent4de620ab3d4c5555c4e0702e5c904fe5791fe7b4 (diff)
downloadbcm5719-llvm-bbf8f23ed93a79f1427e9b42a197228075d7fe96.tar.gz
bcm5719-llvm-bbf8f23ed93a79f1427e9b42a197228075d7fe96.zip
Fix inverted regex search.
I was using the pattern as the source string and vice versa causing strange regular expression errors. llvm-svn: 313590
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/llvm/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 175aa699327..cd1f8eea750 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -148,14 +148,14 @@ class LLVMConfig(object):
output, _ = llvm_config_cmd.communicate()
output = output.decode(encoding)
lines = output.split('\n')
- for (line, (_, patterns)) in zip(lines, features):
+ for (feature_line, (_, patterns)) in zip(lines, features):
# We should have either a callable or a dictionary. If it's a
# dictionary, grep each key against the output and use the value if
# it matches. If it's a callable, it does the entire translation.
if callable(patterns):
- features_to_add = patterns(line)
+ features_to_add = patterns(feature_line)
self.config.available_features.update(features_to_add)
else:
- for (match, feature) in patterns.items():
- if re.search(line, match):
+ for (re_pattern, feature) in patterns.items():
+ if re.search(re_pattern, feature_line):
self.config.available_features.add(feature)
OpenPOWER on IntegriCloud