view python/ppci/core/context.py @ 108:8267ba1dbce3

Added testcode
author Windel Bouwman
date Tue, 01 Jan 2013 17:17:44 +0100
parents ed230e947dc6
children 9e552d34bd60
line wrap: on
line source

from .llvmtype import IntegerType, llvmType, typeID, FunctionType

class Context:
   """ 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)