Mercurial > lcfOS
diff python/ppci/core/context.py @ 104:ed230e947dc6
Added hexviewer
author | windel |
---|---|
date | Sun, 30 Dec 2012 22:31:55 +0100 |
parents | 4a37d6992bd3 |
children | 9e552d34bd60 |
line wrap: on
line diff
--- a/python/ppci/core/context.py Wed Dec 26 10:53:33 2012 +0100 +++ b/python/ppci/core/context.py Sun Dec 30 22:31:55 2012 +0100 @@ -1,4 +1,12 @@ +from .llvmtype import IntegerType, llvmType, typeID, FunctionType class Context: - pass + """ Global context """ + def __init__(self): + self.Int8Type = IntegerType(self, 8) + self.Int16Type = IntegerType(self, 16) + self.Int32Type = IntegerType(self, 32) + self.Int64Type = IntegerType(self, 64) + self.VoidType = llvmType(self, typeID.Void) + self.DoubleType = llvmType(self, typeID.Double)