[LLVMdev] Two new 'llvmnotes'

Chris Lattner sabre at nondot.org
Sun Apr 27 12:56:03 PDT 2008

On Apr 27, 2008, at 12:49 PM, Nick Lewycky wrote:

> Chris Lattner wrote:
>> On Apr 27, 2008, at 10:58 AM, Talin wrote:
>>> I would certainly make use of this in my frontend.
>>> I suggest the names "getfield" and "setfield" for the two  
>>> operations,
>> I agree that 'get/insertvalue' are pretty generic, and am welcome to
>> suggestions.  Get/set *field* imply that this applies only to  
>> structs,
>> but it also works with arrays.  I would actually prefer get/insert
>> *element* but insertelement is already taken.
> What's wrong with using insert/extractelement for arrays and structs  
> as
> well as vectors? They're all sequence types.

Vector insert/extract element take (potentially variable) Value*'s for  
the index and only allows one index.  Aggregate get/set take constants  
and are variadic.


More information about the llvm-dev mailing list