summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2015-12-22 12:47:47 -0800
committerJF Bastien <jfb@chromium.org>2015-12-22 12:47:47 -0800
commit48d8e31f81f16b059728b4b098223ec0ef4c7510 (patch)
tree04647e17304f45f2ce515109c5342b5ccb0bc55c
parentbf680f7553433c2cd0ffdd641e4e37fceed8b7ed (diff)
downloadbinaryen-48d8e31f81f16b059728b4b098223ec0ef4c7510.tar.gz
binaryen-48d8e31f81f16b059728b4b098223ec0ef4c7510.tar.bz2
binaryen-48d8e31f81f16b059728b4b098223ec0ef4c7510.zip
Add missing virtual dtor
Deleting a Pass* wasn't doing the right thing.
-rw-r--r--src/pass.cpp2
-rw-r--r--src/wasm.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/pass.cpp b/src/pass.cpp
index 63b1a7869..59f51df09 100644
--- a/src/pass.cpp
+++ b/src/pass.cpp
@@ -86,7 +86,7 @@ P* PassRunner::getLast() {
PassRunner::~PassRunner() {
for (auto pass : passes) {
- delete(pass);
+ delete pass;
}
}
diff --git a/src/wasm.h b/src/wasm.h
index 8583f9492..9571c0e7e 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1107,6 +1107,7 @@ private:
template<class ReturnType>
struct WasmVisitor {
+ virtual ~WasmVisitor() {}
// should be pure virtual, but https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048
// Expression visitors
virtual ReturnType visitBlock(Block *curr) { abort(); }