diff python/zcc.py @ 311:ff665880a6b0

Added testcase for kernel and userspace
author Windel Bouwman
date Mon, 16 Dec 2013 12:49:24 +0100
parents b145f8e6050b
children 2c9768114877
line wrap: on
line diff
--- a/python/zcc.py	Fri Dec 13 14:10:10 2013 +0100
+++ b/python/zcc.py	Mon Dec 16 12:49:24 2013 +0100
@@ -10,6 +10,8 @@
 import outstream
 from utils import HexFile
 import target
+from ppci import irutils
+import io
 
 
 logformat='%(asctime)s|%(levelname)s|%(name)s|%(message)s'
@@ -67,7 +69,9 @@
         # Optimization passes, TODO
 
         if dumpir:
-            ircode.dump()
+            f = io.StringIO()
+            irutils.Writer().write(ircode, f)
+            print(f.getvalue())
 
         # Code generation:
         logging.info('Starting code generation for {}'.format(ircode))