aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorLCID Fire <lcid-fire@gmx.net>2012-09-26 00:48:41 +0200
committerLCID Fire <lcid-fire@gmx.net>2012-09-26 00:51:41 +0200
commitacd2e79863fe1003661c03c9819b6d8b42bb4916 (patch)
tree15d33038bb9d513e27f91093465e597327fa5759 /tools/shared.py
parentde2436e3d6157eed64b230f1f6ea4226d6acb98e (diff)
Make check_clang_version return a bool value.
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 020d2652..fa06f958 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -50,8 +50,12 @@ EXPECTED_LLVM_VERSION = (3,1)
def check_clang_version():
expected = 'clang version ' + '.'.join(map(str, EXPECTED_LLVM_VERSION))
actual = Popen([CLANG, '-v'], stderr=PIPE).communicate()[1].split('\n')[0]
- if expected not in actual:
- print >> sys.stderr, 'warning: LLVM version appears incorrect (seeing "%s", expected "%s")' % (actual, expected)
+ if expected in actual:
+ return True
+
+ print >> sys.stderr, 'warning: LLVM version appears incorrect (seeing "%s", expected "%s")' % (actual, expected)
+ return False
+
def check_llvm_version():
try: