Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 441:ca80e42d11e0
Forgot a ->toBasetype() in the array bound code.
Fixes compile/typedef_05.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 30 Jul 2008 20:25:46 +0200 |
parents | d8dc221d3db7 |
children | 76078c8ab5b9 |
comparison
equal
deleted
inserted
replaced
440:d8dc221d3db7 | 441:ca80e42d11e0 |
---|---|
158 // ARRAY BOUNDS HELPER | 158 // ARRAY BOUNDS HELPER |
159 ////////////////////////////////////////////////////////////////////////////////////////*/ | 159 ////////////////////////////////////////////////////////////////////////////////////////*/ |
160 | 160 |
161 void DtoArrayBoundsCheck(Loc& loc, DValue* arr, DValue* index, bool isslice) | 161 void DtoArrayBoundsCheck(Loc& loc, DValue* arr, DValue* index, bool isslice) |
162 { | 162 { |
163 Type* arrty = arr->getType(); | 163 Type* arrty = arr->getType()->toBasetype(); |
164 assert((arrty->ty == Tsarray || arrty->ty == Tarray) && "Can only array bounds check for static or dynamic arrays"); | 164 assert((arrty->ty == Tsarray || arrty->ty == Tarray) && "Can only array bounds check for static or dynamic arrays"); |
165 | 165 |
166 // static arrays can get static checks for static indices | 166 // static arrays can get static checks for static indices |
167 | 167 |
168 if(arr->getType()->ty == Tsarray) | 168 if(arr->getType()->ty == Tsarray) |