Implement StaticMultiMethod

This commit is contained in:
Siu Kwan Lam 2013-01-22 15:33:23 -06:00
commit bd550e3c0e
3 changed files with 59 additions and 2 deletions

View file

@ -6,7 +6,11 @@ from Type import Type
FunctionType = Type.Subclass()
FunctionType.include.add('llvm/DerivedTypes.h')
get = FunctionType.staticmethod(FunctionType.Pointer, Type.Pointer, Bool.From(bool))
get = FunctionType.staticmultimethod([FunctionType.Pointer,
Type.Pointer, Bool.From(bool)],)
# (FunctionType.Pointer,
# Type.Pointer, )])
isVarArg = FunctionType.method(Bool.To(bool))
getReturnType = FunctionType.method(Type.Pointer)
getParamType = FunctionType.method(Type.Pointer, Unsigned.From(int))