diff options
Diffstat (limited to 'clang/lib/Tooling/Execution.cpp')
-rw-r--r-- | clang/lib/Tooling/Execution.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Tooling/Execution.cpp b/clang/lib/Tooling/Execution.cpp index 0e3404f91c8..498d683f892 100644 --- a/clang/lib/Tooling/Execution.cpp +++ b/clang/lib/Tooling/Execution.cpp @@ -61,7 +61,7 @@ createExecutorFromCommandLineArgsImpl(int &argc, const char **argv, const char *Overview) { auto OptionsParser = CommonOptionsParser::create(argc, argv, Category, llvm::cl::ZeroOrMore, - /*Overview=*/nullptr); + /*Overview=*/Overview); if (!OptionsParser) return OptionsParser.takeError(); for (auto I = ToolExecutorPluginRegistry::begin(), @@ -95,5 +95,11 @@ createExecutorFromCommandLineArgs(int &argc, const char **argv, Overview); } +// This anchor is used to force the linker to link in the generated object file +// and thus register the StandaloneToolExecutorPlugin. +extern volatile int StandaloneToolExecutorAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED StandaloneToolExecutorAnchorDest = + StandaloneToolExecutorAnchorSource; + } // end namespace tooling } // end namespace clang |