[PATCH] [Driver] Refactor clang driver to use LLVM's Option library
Reid Kleckner
rnk at google.com
Thu Jun 13 11:39:26 PDT 2013
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt;' in Driver and Frontend .cpp files
- Adding 'llvm::opt::' specifiers to .h files
- git-clang-format on the changes, which mostly affects the .h files due
to the extra specifiers
I could reduce the diff significantly with using directives in the
internal Driver and Frontend header files if people feel like that's OK.
See for example ToolChains.h. The coding standards talk about using
directives being OK in "implementation" files, and internal headers may
fall into that category.
clang-format produced some formattings that I'm not sure are standard
LLVM style. They look like:
ReturnTypeIsReallyLong
methodNameIsAlsoUnusuallyLong(ParamTy P1, ParamTy P2);
I think I see this more commonly:
ReturnTypeIsReallyLong
methodNameIsAlsoUnusuallyLong(ParamTy P1, ParamTy P2);
Or:
ReturnTypeIsReallyLong methodNameIsAlsoUnusuallyLong(ParamTy P1,
ParamTy P2);
I figured I should ask up front if that's OK, and if not, it's probably
best to go fix clang-format, re-run, and resend.
http://llvm-reviews.chandlerc.com/D975
Files:
include/clang/Driver/Action.h
include/clang/Driver/Arg.h
include/clang/Driver/ArgList.h
include/clang/Driver/CC1AsOptions.h
include/clang/Driver/CC1AsOptions.td
include/clang/Driver/CMakeLists.txt
include/clang/Driver/Compilation.h
include/clang/Driver/Driver.h
include/clang/Driver/Job.h
include/clang/Driver/OptParser.td
include/clang/Driver/OptSpecifier.h
include/clang/Driver/OptTable.h
include/clang/Driver/Option.h
include/clang/Driver/Options.h
include/clang/Driver/Options.td
include/clang/Driver/Tool.h
include/clang/Driver/ToolChain.h
include/clang/Driver/Util.h
include/clang/Frontend/CompilerInvocation.h
include/clang/Frontend/Utils.h
lib/Driver/Action.cpp
lib/Driver/Arg.cpp
lib/Driver/ArgList.cpp
lib/Driver/CC1AsOptions.cpp
lib/Driver/CMakeLists.txt
lib/Driver/Compilation.cpp
lib/Driver/Driver.cpp
lib/Driver/DriverOptions.cpp
lib/Driver/InputInfo.h
lib/Driver/Job.cpp
lib/Driver/OptTable.cpp
lib/Driver/Option.cpp
lib/Driver/SanitizerArgs.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
lib/Driver/Tools.h
lib/Driver/WindowsToolChain.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/CreateInvocationFromCommandLine.cpp
lib/FrontendTool/ExecuteCompilerInvocation.cpp
lib/Tooling/Tooling.cpp
tools/clang-check/ClangCheck.cpp
tools/driver/cc1_main.cpp
tools/driver/cc1as_main.cpp
tools/driver/driver.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D975.1.patch
Type: text/x-patch
Size: 176491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130613/f36df8a9/attachment.bin>
More information about the cfe-commits
mailing list