[cfe-commits] [PATCHES] refactoring and cleanup

nobled nobled at dreamwidth.org
Thu Apr 7 14:42:19 PDT 2011


I'm working on a patch series to extend clang to parse GLSL, and I
came up with these generic cleanups along the way -- the GLSL patches
depend on the last three, at least, going in first.

(There was a patch #1, but I dropped it and didn't rename the files.)
====
2. refactor -ccc-gcc-name code

Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.

This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.
====
3. refactor flags for TokenKinds.def

Make KEYALL a combination of all other flags instead
of its own separate flag. Also rewrite the enum
definitions in hex instead of decimal.
====
4. complete TokenKinds.def documentation

It was missing a description of BOOLSUPPORT.
====
5. generalize number parsing for directives other than #line

This makes way for sharing code with GLSL's #version directive.
====

Okay to commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-refactor-ccc-gcc-name-code.patch
Type: text/x-patch
Size: 4151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110407/32044467/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-refactor-flags-for-TokenKinds.def.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110407/32044467/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-complete-TokenKinds.def-documentation.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110407/32044467/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-generalize-number-parsing-for-directives-other-than-.patch
Type: text/x-patch
Size: 6054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110407/32044467/attachment-0003.bin>


More information about the cfe-commits mailing list