diff options
author | Max Graey <maxgraey@gmail.com> | 2022-08-01 23:44:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-01 20:44:21 +0000 |
commit | 74bbaf2976312002329bc84f767869987cd18535 (patch) | |
tree | d3f1002f6d7771326ffccfb152f09dbfc94c9d28 /src/ir/drop.cpp | |
parent | 0b288693cc74810278af9c4630fdb0d5fa7dd7bd (diff) | |
download | binaryen-74bbaf2976312002329bc84f767869987cd18535.tar.gz binaryen-74bbaf2976312002329bc84f767869987cd18535.tar.bz2 binaryen-74bbaf2976312002329bc84f767869987cd18535.zip |
[NFC] Refactor getDroppedChildrenAndAppend (#4849)
Diffstat (limited to 'src/ir/drop.cpp')
-rw-r--r-- | src/ir/drop.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir/drop.cpp b/src/ir/drop.cpp index d033c0876..49bff55f7 100644 --- a/src/ir/drop.cpp +++ b/src/ir/drop.cpp @@ -75,10 +75,10 @@ Expression* getDroppedChildrenAndAppend(Expression* curr, contents.push_back(child); } } - contents.push_back(last); - if (contents.size() == 1) { - return contents[0]; + if (contents.empty()) { + return last; } + contents.push_back(last); return builder.makeBlock(contents); } |