Skip to content
Permalink
Browse files
Inlining clones can call this method. Make sure they do not pick up e…
…nsureClone state.
  • Loading branch information
enebo committed Oct 15, 2014
1 parent 79a8dba commit 89523623abcfd4d48aa41e8ddbd47e718c47b9e6
Showing 1 changed file with 3 additions and 1 deletion.
@@ -24,7 +24,9 @@ protected CloneInfo(IRScope scope) {
}

public SimpleCloneInfo cloneForCloningClosure(IRClosure clonedClosure) {
SimpleCloneInfo clone = new SimpleCloneInfo(clonedClosure, true);
// If cloning for ensure block cloning we want to propagate that to child closure clones
boolean ensureClone = this instanceof SimpleCloneInfo && ((SimpleCloneInfo) this).isEnsureBlockCloneMode();
SimpleCloneInfo clone = new SimpleCloneInfo(clonedClosure, ensureClone);

for (Variable v: variableRenameMap.keySet()) {
clone.variableRenameMap.put(v, variableRenameMap.get(v));

0 comments on commit 8952362

Please sign in to comment.