[llvm-commits] llvm-gcc: take object size from target, not source, in VIEW_CONVERT_EXPR
Devang Patel
dpatel at apple.com
Wed Mar 14 11:23:19 PDT 2007
On Mar 8, 2007, at 4:35 AM, Duncan Sands wrote:
> VIEW_CONVERT_EXPR is sometimes used as a way of specifying the size of
> an object when the size would otherwise be unknown. In the (Ada)
> testcase an array, the type of which involves placeholder expressions,
> is view converted to an array type with length 2 (the compiler
> knows it
> has length 2, but presumably considers it too hard to work out what
> value
> should be substituted in the placeholder in order to get length 2 out,
> so uses a VIEW_CONVERT_EXPR instead). I think this can only happen
> for
> lvalues, though I'm not completely sure. This patch special cases
> view conversion of aggregate lvalues, using the size of the target
> type
> rather than the source type in the call to EmitAggregateCopy.
Applied.
-
Devang
More information about the llvm-commits
mailing list