diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h b/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h index 1381238..2853bc8 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h @@ -42,7 +42,8 @@ namespace clang { /// type, or by coercing to another specified type stored in /// 'CoerceToType'). If an offset is specified (in UIntData), then the /// argument passed is offset by some number of bytes in the memory - /// representation. + /// representation. A dummy argument is emitted before the real argument + /// if the specified type stored in "PaddingType" is not zero. Direct, /// Extend - Valid only for integer argument types. Same as 'direct' @@ -69,19 +70,22 @@ namespace clang { private: Kind TheKind; llvm::Type *TypeData; + llvm::Type *PaddingType; // Currently allowed only for Direct. unsigned UIntData; bool BoolData0; bool BoolData1; - ABIArgInfo(Kind K, llvm::Type *TD=0, - unsigned UI=0, bool B0 = false, bool B1 = false) - : TheKind(K), TypeData(TD), UIntData(UI), BoolData0(B0), BoolData1(B1) {} + ABIArgInfo(Kind K, llvm::Type *TD=0, unsigned UI=0, + bool B0 = false, bool B1 = false, llvm::Type* P = 0) + : TheKind(K), TypeData(TD), PaddingType(P), UIntData(UI), BoolData0(B0), + BoolData1(B1) {} public: ABIArgInfo() : TheKind(Direct), TypeData(0), UIntData(0) {} - static ABIArgInfo getDirect(llvm::Type *T = 0, unsigned Offset = 0) { - return ABIArgInfo(Direct, T, Offset); + static ABIArgInfo getDirect(llvm::Type *T = 0, unsigned Offset = 0, + llvm::Type *Padding = 0) { + return ABIArgInfo(Direct, T, Offset, false, false, Padding); } static ABIArgInfo getExtend(llvm::Type *T = 0) { return ABIArgInfo(Extend, T, 0); @@ -113,6 +117,11 @@ namespace clang { assert((isDirect() || isExtend()) && "Not a direct or extend kind"); return UIntData; } + + llvm::Type *getPaddingType() const { + return PaddingType; + } + llvm::Type *getCoerceToType() const { assert(canHaveCoerceToType() && "Invalid kind!"); return TypeData; |