summaryrefslogtreecommitdiff
path: root/src/cfg/Relooper.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-26 10:13:48 -0700
committerGitHub <noreply@github.com>2016-08-26 10:13:48 -0700
commit801baed1ca81d87380d56298289fe8cc0b4f1e1a (patch)
tree683c8535f4e6072e41eda4fcda08e00da42b6626 /src/cfg/Relooper.cpp
parent2cb8b275caf090bf56cc78424aaa97766cd02fb6 (diff)
parenta008d4fd7af3b04a3d351a03d56df7c28998690e (diff)
downloadbinaryen-801baed1ca81d87380d56298289fe8cc0b4f1e1a.tar.gz
binaryen-801baed1ca81d87380d56298289fe8cc0b4f1e1a.tar.bz2
binaryen-801baed1ca81d87380d56298289fe8cc0b4f1e1a.zip
Merge pull request #682 from loganchien/fix-empty-deadlock
Fix asm2wasm dead lock caused by empty module
Diffstat (limited to 'src/cfg/Relooper.cpp')
-rw-r--r--src/cfg/Relooper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cfg/Relooper.cpp b/src/cfg/Relooper.cpp
index cde61df0b..e75adbce5 100644
--- a/src/cfg/Relooper.cpp
+++ b/src/cfg/Relooper.cpp
@@ -98,7 +98,7 @@ Branch::Branch(wasm::Expression* ConditionInit, wasm::Expression* CodeInit) : An
Branch::Branch(std::vector<wasm::Index>&& ValuesInit, wasm::Expression* CodeInit) : Ancestor(nullptr), Code(CodeInit) {
if (ValuesInit.size() > 0) {
- SwitchValues = std::unique_ptr<std::vector<wasm::Index>>(new std::vector<wasm::Index>(ValuesInit));
+ SwitchValues = wasm::make_unique<std::vector<wasm::Index>>(ValuesInit);
}
// otherwise, it is the default
}