diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2019-09-04 14:26:28 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2019-09-04 14:26:28 +0000 |
commit | 433927595dde3821c76b33725aab8ccd472a5137 (patch) | |
tree | c43b08da79c34b273d3ddc64a1e0d809c68d64c2 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | cbf1f3b771c8c0e0858deafe5f9457fb838ff2c2 (diff) | |
download | llvm-433927595dde3821c76b33725aab8ccd472a5137.zip llvm-433927595dde3821c76b33725aab8ccd472a5137.tar.gz llvm-433927595dde3821c76b33725aab8ccd472a5137.tar.bz2 |
[Driver] Use shared singleton instance of DriverOptTable
Summary:
This significantly reduces the time required to run clangd tests, by
~10%.
Should also have an effect on other tests that run command-line parsing
multiple times inside a single invocation.
Reviewers: gribozavr, sammccall
Reviewed By: sammccall
Subscribers: kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67163
llvm-svn: 370908
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index e11d506..8e17edc 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -185,11 +185,11 @@ CreateFrontendAction(CompilerInstance &CI) { bool ExecuteCompilerInvocation(CompilerInstance *Clang) { // Honor -help. if (Clang->getFrontendOpts().ShowHelp) { - std::unique_ptr<OptTable> Opts = driver::createDriverOptTable(); - Opts->PrintHelp(llvm::outs(), "clang -cc1 [options] file...", - "LLVM 'Clang' Compiler: http://clang.llvm.org", - /*Include=*/driver::options::CC1Option, - /*Exclude=*/0, /*ShowAllAliases=*/false); + driver::getDriverOptTable().PrintHelp( + llvm::outs(), "clang -cc1 [options] file...", + "LLVM 'Clang' Compiler: http://clang.llvm.org", + /*Include=*/driver::options::CC1Option, + /*Exclude=*/0, /*ShowAllAliases=*/false); return true; } |