[Patch] Turn Driver::CCCIsCXX and CCCIsCPP into an enum, add -cxx-mode= option

Hans Wennborg hans at chromium.org
Mon Jul 15 16:17:39 PDT 2013


Hi all,

This patch is a follow-up to the discussion in Reid's cl.exe
compatible driver proposal [1].

Clang currently looks at argv[0] to switch between running in
gcc/g++/cpp mode. This mode is represented in Driver by CCCIsCXX and
CCCIsCPP. Since there is no overlap between the three modes, I have
turned those two variables into an enum instead. The plan is to later
extend this enum with a "cl.exe mode".

The patch also adds a new command line option, -ccc-mode, to set the
mode. This replaces the current -ccc-cxx option (and also makes it
easier to test the cpp mode). This option is special: because the mode
can affect option parsing (the cl.exe mode will add new options), the
-ccc-mode needs to be parsed early.

Please take a look!

Thanks,
Hans

[1]. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030439.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cccmode-enum.patch
Type: application/octet-stream
Size: 24829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130715/17fc2a5f/attachment.obj>


More information about the cfe-commits mailing list