summaryrefslogtreecommitdiff
path: root/src/ast-parser-lexer-shared.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-03-16 14:49:06 -0700
committerGitHub <noreply@github.com>2017-03-16 14:49:06 -0700
commit5b642c3ce487b77102dec4fc4b55538cfbccc5ff (patch)
tree960aebda63374bd6d5660355f836e935b402bdc0 /src/ast-parser-lexer-shared.cc
parent81a64d68c7ce50617bac025061d8f6db91b00ee9 (diff)
downloadwabt-5b642c3ce487b77102dec4fc4b55538cfbccc5ff.tar.gz
wabt-5b642c3ce487b77102dec4fc4b55538cfbccc5ff.tar.bz2
wabt-5b642c3ce487b77102dec4fc4b55538cfbccc5ff.zip
Use std::unordered_multimap for BindingHash (#357)
This change can't really be done in isolation, since once we add members with constructors to a struct, it is no longer has a trivial constructor. This propagates through all types that use it, etc. There are a number of changes that are ugly, but hopefully reduced the amount of code that needed to change. In particular, I changed some union members to pointers so they would stay trivially constructible. Another tricky change is the handling of duplicate bindings: previously we just relied on the fact that our hash implementation would be consistent. A nicer solution is to display the duplicated bindings in source order. There's probably a nicer way to do this; bikeshedding welcome. :-)
Diffstat (limited to 'src/ast-parser-lexer-shared.cc')
-rw-r--r--src/ast-parser-lexer-shared.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/ast-parser-lexer-shared.cc b/src/ast-parser-lexer-shared.cc
index 78b7cecb..e35d1e35 100644
--- a/src/ast-parser-lexer-shared.cc
+++ b/src/ast-parser-lexer-shared.cc
@@ -80,7 +80,6 @@ void destroy_optional_export(OptionalExport* export_) {
void destroy_exported_func(ExportedFunc* exported_func) {
destroy_optional_export(&exported_func->export_);
- destroy_func(exported_func->func);
delete exported_func->func;
}