[llvm-commits] TableGen: simplify TableGenMain interface.

Sean Silva silvas at purdue.edu
Wed Oct 3 14:41:00 PDT 2012


Landed in r165165 r165166 r165167 r165168.

-- Sean Silva

On Wed, Oct 3, 2012 at 4:08 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Oct 2, 2012, at 9:14 PM, Sean Silva <silvas at purdue.edu> wrote:
>
>> TableGenMain()'s second argument is a "dummy" class TableGenAction
>> which basically just has a virtual operator(). This patch set moves
>> the interface over to being just a function pointer, which is a lot
>> simpler, and fits the needs of existing users just fine. The switch
>> allows removing 2 files which just had dummy declarations/definitions.
>>
>> In order to avoid rev-lock between the Clang and LLVM trees, the patch
>> set maintains the old API until all users are migrated, then removes
>> the old API completely. Both projects build at each intermediate step.
>>
>> A description of the patches:
>>
>> 0001-tblgen-Put-new-TableGenMain-API-in-place.patch:
>> Sets up the new API by introducing a new overload of TableGenMain()
>> accepting the function pointer. The old API is kept in place.
>>
>> 0002-tblgen-Migrate-llvm-tblgen-to-new-TableGenMain-API.patch,
>> 0003-tblgen-Migrate-clang-tblgen-to-new-TableGenMain-API.patch:
>> Moves {llvm,clang}-tblgen over to using the new API. This is basically
>> just moving a large block of code from an operator() to a free
>> function.
>>
>> 0004-tblgen-Remove-last-traces-of-old-TableGenMain-API.patch:
>> Removes the old API.
>>
>> Review and feedback welcome. Does this look OK to commit?
>
> Yes, looks good.
>
> /jakob
>
>



More information about the llvm-commits mailing list