diff options
author | LCID Fire <lcid-fire@gmx.net> | 2012-09-26 00:48:41 +0200 |
---|---|---|
committer | LCID Fire <lcid-fire@gmx.net> | 2012-09-26 00:51:41 +0200 |
commit | acd2e79863fe1003661c03c9819b6d8b42bb4916 (patch) | |
tree | 15d33038bb9d513e27f91093465e597327fa5759 | |
parent | de2436e3d6157eed64b230f1f6ea4226d6acb98e (diff) |
Make check_clang_version return a bool value.
-rw-r--r-- | tools/shared.py | 8 |
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: |