[llvm-commits] [LNT] r161338 - /lnt/trunk/lnt/testing/util/compilers.py

Daniel Dunbar daniel at zuster.org
Mon Aug 6 13:02:58 PDT 2012


Author: ddunbar
Date: Mon Aug  6 15:02:58 2012
New Revision: 161338

URL: http://llvm.org/viewvc/llvm-project?rev=161338&view=rev
Log:
Don't crash if the cc1_binary we infer doesn't exist.

Modified:
    lnt/trunk/lnt/testing/util/compilers.py

Modified: lnt/trunk/lnt/testing/util/compilers.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/testing/util/compilers.py?rev=161338&r1=161337&r2=161338&view=diff
==============================================================================
--- lnt/trunk/lnt/testing/util/compilers.py (original)
+++ lnt/trunk/lnt/testing/util/compilers.py Mon Aug  6 15:02:58 2012
@@ -192,7 +192,7 @@
              'cc_ld_version' : cc_ld_version,
              'cc_target_assembly' : cc_target_assembly,
              }
-    if cc1_binary is not None:
+    if cc1_binary is not None and os.path.exists(cc1_binary):
         cc1_exec_hash = hashlib.sha1()
         cc1_exec_hash.update(open(cc1_binary,'rb').read())
         info['cc1_exec_hash'] = cc1_exec_hash.hexdigest()





More information about the llvm-commits mailing list