[llvm-commits] [llvm] r40128 - /llvm/trunk/test/CFrontend/2004-02-13-Memset.c
Chris Lattner
clattner at apple.com
Sat Jul 21 14:17:41 PDT 2007
On Jul 21, 2007, at 3:28 AM, Duncan Sands wrote:
> Hi Chris,
>
>> This is fine. However, I'm curious. Do you mean it fails due to the
>> calls to get_pointer_alignment in TreeToLLVM::EmitBuiltinMemCopy?
>
> Yes, the calls to get_pointer_alignment return zero. This causes
> EmitBuiltinMemCopy and friends to bail out.
>
>> If so, we should fix TreeToLLVM::EmitBuiltinMemCopy to treat a null
>> return as alignment = 1.
>
> A 0 return could also mean that the argument wasn't a pointer - I
> will check if this is problematic or not.
Okay, we could just do an explicit check before that to decide if the
argument is a pointer. If not, bail out before calling
get_pointer_alignment. Then, after the get_pointer_alignment call is
made, if it returns zero, just set the alignment to 1.
-Chris
More information about the llvm-commits
mailing list