comparison gen/abi.h @ 1359:34f2fd925de3

Intrinsics shouldn't see struct padding, so use a special TargetABI for them that removes it. This unbreaks the `llvm_*_with_overflow` intrinsics.
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 16 May 2009 13:06:49 +0200
parents 6bb04dbee21f
children
comparison
equal deleted inserted replaced
1357:48747003a5de 1359:34f2fd925de3
31 }; 31 };
32 32
33 // interface called by codegen 33 // interface called by codegen
34 struct TargetABI 34 struct TargetABI
35 { 35 {
36 /// Returns the ABI for the target we're compiling for
36 static TargetABI* getTarget(); 37 static TargetABI* getTarget();
38 /// Returns the ABI for intrinsics
39 static TargetABI* getIntrinsic();
37 40
38 virtual void newFunctionType(TypeFunction* tf) {} 41 virtual void newFunctionType(TypeFunction* tf) {}
39 virtual bool returnInArg(TypeFunction* tf) = 0; 42 virtual bool returnInArg(TypeFunction* tf) = 0;
40 virtual bool passByVal(Type* t) = 0; 43 virtual bool passByVal(Type* t) = 0;
41 virtual void doneWithFunctionType() {} 44 virtual void doneWithFunctionType() {}