Browse Source

Revert fix for #120. Siegfried found a case where the C# compiler creates a useless variable in debug builds.

We will keep performing dead store removal for all variables.
pull/166/head
Daniel Grunwald 15 years ago
parent
commit
f68775e468
  1. 2
      ICSharpCode.Decompiler/ILAst/ILInlining.cs

2
ICSharpCode.Decompiler/ILAst/ILInlining.cs

@ -162,7 +162,7 @@ namespace ICSharpCode.Decompiler.ILAst @@ -162,7 +162,7 @@ namespace ICSharpCode.Decompiler.ILAst
return true;
} else if (numLdloc.GetOrDefault(v) == 0 && numLdloca.GetOrDefault(v) == 0) {
// The variable is never loaded
if (inlinedExpression.HasNoSideEffects() && v.IsGenerated) {
if (inlinedExpression.HasNoSideEffects()) {
// Remove completely
body.RemoveAt(pos);
return true;

Loading…
Cancel
Save