diff options
Diffstat (limited to 'src/passes/Untee.cpp')
-rw-r--r-- | src/passes/Untee.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/passes/Untee.cpp b/src/passes/Untee.cpp index 79c76b988..6e5fb489b 100644 --- a/src/passes/Untee.cpp +++ b/src/passes/Untee.cpp @@ -41,9 +41,10 @@ struct Untee : public WalkerPass<PostWalker<Untee>> { } else { // a normal tee. replace with set and get Builder builder(*getModule()); - replaceCurrent(builder.makeSequence( - curr, builder.makeLocalGet(curr->index, curr->value->type))); - curr->setTee(false); + LocalGet* get = builder.makeLocalGet( + curr->index, getFunction()->getLocalType(curr->index)); + replaceCurrent(builder.makeSequence(curr, get)); + curr->makeSet(); } } } |