Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 8952362
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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));
Expand Down

0 comments on commit 8952362

Please sign in to comment.