[LLVMdev] inefficiencies in ConstantUniqueMap ?
Jay Foad
jay.foad at gmail.com
Thu Jun 30 06:37:55 PDT 2011
I'll have another go then!
> I find this distinction between structs with names and structs without
> names strange. Why is a name relevant to anything? If you can add fields
> to a struct with a name [...]
This corresponds to the following C constructs:
struct S; // create struct with name but no fields
...
struct S { int i, j; } // add fields to named struct
> [...] why not to a struct without a name?
This would imply that you were starting with a struct with no name and
no fields, which is not something you can create in C:
struct; // this isn't a C type!
Maybe "adding fields" is bad terminology -- we're really talking about
setting the struct's list of fields, which you can only do once. (You
can't add yet more fields later.)
Jay.
More information about the llvm-dev
mailing list