mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Add method to return the type this type will be promoted to if it is
passed through a variable argument function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21462 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ebdb53c01
commit
4283d49e06
@ -236,6 +236,20 @@ public:
|
|||||||
return getForwardedTypeInternal();
|
return getForwardedTypeInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getVAArgsPromotedType - Return the type an argument of this type
|
||||||
|
/// will be promoted to if passed through a variable argument
|
||||||
|
/// function.
|
||||||
|
const Type *getVAArgsPromotedType() const {
|
||||||
|
if (ID == BoolTyID || ID == UByteTyID || ID == UShortTyID)
|
||||||
|
return Type::UIntTy;
|
||||||
|
else if (ID == SByteTyID || ID == ShortTyID)
|
||||||
|
return Type::IntTy;
|
||||||
|
else if (ID == FloatTyID)
|
||||||
|
return Type::DoubleTy;
|
||||||
|
else
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Type Iteration support
|
// Type Iteration support
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user