From 53fe662957ffb68b4ef09b299d3045e265ce2859 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Fri, 25 Feb 2011 22:29:34 +0300 Subject: [PATCH] Fix a bunch of incorrect assert --- gen/abi-generic.h | 8 ++++---- gen/abi-x86-64.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gen/abi-generic.h b/gen/abi-generic.h index c32b70dc..a3ffa4a8 100644 --- a/gen/abi-generic.h +++ b/gen/abi-generic.h @@ -15,24 +15,24 @@ struct RemoveStructPadding : ABIRewrite { // TODO: Only do this if there's padding, and/or only initialize padding. DtoMemSetZero(lval, DtoConstSize_t(getTypePaddedSize(DtoType(dty)))); - DtoPaddedStruct(dty, v->getRVal(), lval); + DtoPaddedStruct(dty->toBasetype(), v->getRVal(), lval); return lval; } /// get a rewritten value back to its original form and store result in provided lvalue /// this one is optional and defaults to calling the one above virtual void getL(Type* dty, DValue* v, llvm::Value* lval) { - DtoPaddedStruct(dty, v->getRVal(), lval); + DtoPaddedStruct(dty->toBasetype(), v->getRVal(), lval); } /// put out rewritten value virtual LLValue* put(Type* dty, DValue* v) { - return DtoUnpaddedStruct(dty, v->getRVal()); + return DtoUnpaddedStruct(dty->toBasetype(), v->getRVal()); } /// return the transformed type for this rewrite virtual const LLType* type(Type* dty, const LLType* t) { - return DtoUnpaddedStructType(dty); + return DtoUnpaddedStructType(dty->toBasetype()); } }; diff --git a/gen/abi-x86-64.cpp b/gen/abi-x86-64.cpp index af31a64e..e1ed8614 100644 --- a/gen/abi-x86-64.cpp +++ b/gen/abi-x86-64.cpp @@ -652,8 +652,8 @@ bool X86_64TargetABI::passByVal(Type* t) { // Structs passed or returned in registers are passed here // to get their padding removed (if necessary). void X86_64TargetABI::fixup_D(IrFuncTyArg& arg) { - assert(arg.type->ty == Tstruct); - LLType* abiTy = DtoUnpaddedStructType(arg.type); + assert(arg.type->toBasetype()->ty == Tstruct); + LLType* abiTy = DtoUnpaddedStructType(arg.type->toBasetype()); if (abiTy && abiTy != arg.ltype) { arg.ltype = abiTy;