[PATCH] D20218: [Tooling] Fix broken dependency for shared build
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Thu May 12 12:37:43 PDT 2016
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
There virtual destructor can't be found and cause a compilation error
on a shared build.
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Which produce this error:
```
tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/ToolingTest.cpp.o: In function `clang::tooling::newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test::TestBody()':
ToolingTest.cpp:(.text._ZN5clang7tooling66newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test8TestBodyEv+0x49): undefined reference to `clang::SyntaxOnlyAction::~SyntaxOnlyAction()'
```
http://reviews.llvm.org/D20218
Files:
include/clang/Frontend/FrontendActions.h
lib/Frontend/FrontendActions.cpp
Index: lib/Frontend/FrontendActions.cpp
===================================================================
--- lib/Frontend/FrontendActions.cpp
+++ lib/Frontend/FrontendActions.cpp
@@ -401,6 +401,9 @@
return OS;
}
+SyntaxOnlyAction::~SyntaxOnlyAction() {
+}
+
std::unique_ptr<ASTConsumer>
SyntaxOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
return llvm::make_unique<ASTConsumer>();
Index: include/clang/Frontend/FrontendActions.h
===================================================================
--- include/clang/Frontend/FrontendActions.h
+++ include/clang/Frontend/FrontendActions.h
@@ -129,6 +129,7 @@
StringRef InFile) override;
public:
+ ~SyntaxOnlyAction() override;
bool hasCodeCompletionSupport() const override { return true; }
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20218.57089.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160512/efa72a19/attachment.bin>
More information about the cfe-commits
mailing list