add type asserts in appendReturn and appendCall

This commit is contained in:
Joshua Warner 2014-05-03 21:30:31 -06:00 committed by Joshua Warner
parent 148d35bab5
commit 9282c78549

View File

@ -606,6 +606,7 @@ void appendCall(Context* c,
unsigned resultSize,
util::Slice<ir::Value*> arguments)
{
assert(c, resultSize == result->type.size());
append(c,
new (c->zone) CallEvent(c,
address,
@ -650,6 +651,7 @@ class ReturnEvent: public Event {
};
void appendReturn(Context* c, unsigned size, Value* value) {
assert(c, (value == 0 && size == 0) || size == value->type.size());
append(c, new(c->zone) ReturnEvent(c, size, value));
}