This is an archive of the discontinued LLVM Phabricator instance.

TableGen: Support folding casts from bits to int
ClosedPublic

Authored by arsenm on Jul 29 2015, 11:26 PM.

Details

Reviewers
arsenm
Summary

This is to fix an incorrect error when trying to initialize
DwarfNumbers with a !cast<int> of a bits initializer.
getValuesAsListOfInts("DwarfNumbers") would not see an IntInit
and instead the cast, so would give up.

It seems likely that this could be generalized to attempt
the convertInitializerTo for any type. I'm not really sure
why the existing code seems to special case the string cast cases
when convertInitializerTo seems like it should generally handle this
sort of thing.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 30992.Jul 29 2015, 11:26 PM
arsenm retitled this revision from to TableGen: Support folding casts from bits to int.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
arsenm accepted this revision.Jul 30 2015, 6:12 PM
arsenm added a reviewer: arsenm.

r243722

This revision is now accepted and ready to land.Jul 30 2015, 6:12 PM
arsenm closed this revision.Jul 30 2015, 6:13 PM