Browse Source

Allow inlining of compiler-generated temporaries for conditional branches.

pull/728/head
Daniel Grunwald 11 years ago
parent
commit
781ee2664f
  1. 3
      ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

3
ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

@ -265,8 +265,9 @@ namespace ICSharpCode.Decompiler.IL @@ -265,8 +265,9 @@ namespace ICSharpCode.Decompiler.IL
var parent = loadInst.Parent;
switch (next.OpCode) {
case OpCode.Return:
case OpCode.IfInstruction:
return parent == next;
case OpCode.IfInstruction:
return parent == next || (parent.OpCode == OpCode.LogicNot && parent.Parent == next);
case OpCode.SwitchInstruction:
return parent == next || (parent.OpCode == OpCode.Sub && parent.Parent == next);
default:

Loading…
Cancel
Save