diff python/testir.py @ 172:5a7d37d615ee

Added function to IR
author Windel Bouwman
date Thu, 04 Apr 2013 17:58:37 +0200
parents 3eb9b9e2958d
children c1d2b6b9f9a7
line wrap: on
line diff
--- a/python/testir.py	Wed Apr 03 22:20:20 2013 +0200
+++ b/python/testir.py	Thu Apr 04 17:58:37 2013 +0200
@@ -24,6 +24,13 @@
    y = a - b * 53;
 }
 
+function int add2(int x, int y)
+{
+   var int res;
+   res = x + y;
+   return res;
+}
+
 """
 
 if __name__ == '__main__':
@@ -31,6 +38,7 @@
    builder = c3.Builder(diag)
    cgenx86 = x86.X86CodeGen(diag)
    ir = builder.build(testsrc)
+   diag.printErrors(testsrc)
    ir.check()
    ir.analyze()
    #ir.constantProp()