[PATCH] Add module flags metadata to record the settings for enum and wchar width

Saleem Abdulrasool compnerd at compnerd.org
Thu Jun 19 09:57:34 PDT 2014


wchar_t is unsigned long on any ARM environment strictly following AAPCS.  Windows on ARM does not strictly follow AAPCS (it is pretty close though), and uses an unsigned short for wchar_t.

Enums are a bit more tricky, with them defaulting to short, but extending to long if any of the elements of the enumeration exceed the limits of short.

This seems to simply be recording the values for the short_wchar and short_enum, which is fine.

That said, would you be opposed to using an enumeration for the values of this metadata Oliver?  That would allow us to extend the values in the future if we need to.  If we do so, it would be nicer to rename the metadata to wchar_size and enum_size reflecting that this is not a boolean value.  I realise that this would also require a change to the implementation in D4213.

http://reviews.llvm.org/D4212






More information about the cfe-commits mailing list