diff options
Diffstat (limited to 'src/passes')
-rw-r--r-- | src/passes/J2CLOpts.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/J2CLOpts.cpp b/src/passes/J2CLOpts.cpp index cc73e873e..d0df446e1 100644 --- a/src/passes/J2CLOpts.cpp +++ b/src/passes/J2CLOpts.cpp @@ -43,6 +43,7 @@ Expression* getTrivialFunctionBody(Function* func) { // Only consider trivial the following instructions which can be safely // inlined and note that their size is at most 2. if (body->is<Nop>() || body->is<GlobalGet>() || body->is<Const>() || + (body->is<Block>() && body->cast<Block>()->list.empty()) || // Call with no arguments. (body->is<Call>() && body->dynCast<Call>()->operands.size() == 0) || // Simple global.set with a constant. |