Skip to content

Commit afd2e66

Browse files
committed
Merge pull request #26 from WebAssembly/virtual-dtor
Add missing virtual dtor
2 parents bf680f7 + 1749331 commit afd2e66

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
77

88
SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
99
SET(CMAKE_CXX_FLAGS "-msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS}")
10-
SET(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}")
10+
SET(CMAKE_CXX_FLAGS "-O2 ${CMAKE_CXX_FLAGS}")
1111

1212
# clang doesn't print colored diagnostics when invoked from Ninja
1313
IF (UNIX AND

src/pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ P* PassRunner::getLast() {
8686

8787
PassRunner::~PassRunner() {
8888
for (auto pass : passes) {
89-
delete(pass);
89+
delete pass;
9090
}
9191
}
9292

src/wasm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,7 @@ class Module {
11071107

11081108
template<class ReturnType>
11091109
struct WasmVisitor {
1110+
virtual ~WasmVisitor() {}
11101111
// should be pure virtual, but https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048
11111112
// Expression visitors
11121113
virtual ReturnType visitBlock(Block *curr) { abort(); }

0 commit comments

Comments
 (0)