[llvm-commits] [PATCH 5/6] [llvm-c] Add architecture type enumeration

Gregory Szorc gregory.szorc at gmail.com
Mon Mar 19 14:32:54 PDT 2012


On 3/19/12 3:55 AM, Anton Korobeynikov wrote:
>> I assume the value of enum values must match those in the
>> Triple::ArchType enum. Someone could easily add / remove a target there
>> without realizing the need to update the C bindings. I think it might be
>> worth adding a comment to Triple.h indicating that the
>> LLVMArchitectureType enum must be updated whenever the Triple::ArchType
>> enum is changed.
> Or maybe even some compiler time assert to enforce this? :)
>

Even better would be to have the Clang Python bindings parse the headers 
at build time. I have some outstanding patches for Clang that add a test 
to ensure that the enumerations in the Python bindings match completely 
what is defined in the .h headers. Even better would be to have the 
Python enumerations generated completely automatically. I view these as 
future enhancements.




More information about the llvm-commits mailing list