diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-16 20:42:02 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-16 20:42:02 +0000 |
commit | cf3b6f2504596812db1fcef0df8ce5b3449c4aac (patch) | |
tree | 1a525e666be197564611bc00f666dd45ebc273e0 /lib/CodeGen/ABIInfo.h | |
parent | 93ae947df36133c7a26a0c7d325c0679916ed2ed (diff) |
IRgen/ABI: Add support for realigning structures which are passed by indirect
reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ABIInfo.h')
-rw-r--r-- | lib/CodeGen/ABIInfo.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h index 91b7742557..c90c84a352 100644 --- a/lib/CodeGen/ABIInfo.h +++ b/lib/CodeGen/ABIInfo.h @@ -70,11 +70,12 @@ namespace clang { Kind TheKind; llvm::PATypeHolder TypeData; unsigned UIntData; - bool BoolData; + bool BoolData0; + bool BoolData1; ABIArgInfo(Kind K, const llvm::Type *TD=0, - unsigned UI=0, bool B = false) - : TheKind(K), TypeData(TD), UIntData(UI), BoolData(B) {} + unsigned UI=0, bool B0 = false, bool B1 = false) + : TheKind(K), TypeData(TD), UIntData(UI), BoolData0(B0), BoolData1(B1) {} public: ABIArgInfo() : TheKind(Direct), TypeData(0), UIntData(0) {} @@ -88,8 +89,9 @@ namespace clang { static ABIArgInfo getIgnore() { return ABIArgInfo(Ignore); } - static ABIArgInfo getIndirect(unsigned Alignment, bool ByVal = true) { - return ABIArgInfo(Indirect, 0, Alignment, ByVal); + static ABIArgInfo getIndirect(unsigned Alignment, bool ByVal = true + , bool Realign = false) { + return ABIArgInfo(Indirect, 0, Alignment, ByVal, Realign); } static ABIArgInfo getExpand() { return ABIArgInfo(Expand); @@ -129,7 +131,12 @@ namespace clang { bool getIndirectByVal() const { assert(TheKind == Indirect && "Invalid kind!"); - return BoolData; + return BoolData0; + } + + bool getIndirectRealign() const { + assert(TheKind == Indirect && "Invalid kind!"); + return BoolData1; } void dump() const; |