diff options
author | Eric Liu <ioeric@google.com> | 2017-11-03 15:57:27 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2017-11-03 15:57:27 +0000 |
commit | 152ad0505067afea942699c5ccaaa11ec56e6f43 (patch) | |
tree | ab9cba836a17081cdac6517ab79854baa083ff13 /clang/lib/Tooling/Execution.cpp | |
parent | d3b9f61c52a11516ea90de49e2db7823668b41c5 (diff) | |
download | bcm5719-llvm-152ad0505067afea942699c5ccaaa11ec56e6f43.tar.gz bcm5719-llvm-152ad0505067afea942699c5ccaaa11ec56e6f43.zip |
[Tooling] Fix linking of StandaloneToolExecutorPlugin.
llvm-svn: 317332
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 |