[llvm-commits] [zorg] r105215 - /zorg/trunk/lnt/lnt/testing/util/compilers.py
Daniel Dunbar
daniel at zuster.org
Mon May 31 01:17:53 PDT 2010
Author: ddunbar
Date: Mon May 31 03:17:53 2010
New Revision: 105215
URL: http://llvm.org/viewvc/llvm-project?rev=105215&view=rev
Log:
lnt runtest nt: Fix a crash when interrogating the LLVM compiler for its target
fails.
Modified:
zorg/trunk/lnt/lnt/testing/util/compilers.py
Modified: zorg/trunk/lnt/lnt/testing/util/compilers.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/testing/util/compilers.py?rev=105215&r1=105214&r2=105215&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/testing/util/compilers.py (original)
+++ zorg/trunk/lnt/lnt/testing/util/compilers.py Mon May 31 03:17:53 2010
@@ -101,10 +101,11 @@
['-x', 'c', '/dev/null'],
include_stderr=True).strip()
m = re.search('target triple = "(.*)"', target_cc_ll)
- if not m:
+ if m:
+ cc_target, = m.groups()
+ else:
error("unable to determine LLVM compiler target: %r: %r" %
- (ll_cmd, target_cc_ll))
- cc_target, = m.groups()
+ (cc, target_cc_ll))
cc_exec_hash = hashlib.sha1()
cc_exec_hash.update(open(cc,'rb').read())
More information about the llvm-commits
mailing list