Browse Source

Perform dead store removal only for generated variables. Closes #120.

pull/155/head
Daniel Grunwald 15 years ago
parent
commit
5f069c4ea8
  1. 2
      ICSharpCode.Decompiler/ILAst/ILInlining.cs

2
ICSharpCode.Decompiler/ILAst/ILInlining.cs

@ -147,7 +147,7 @@ namespace ICSharpCode.Decompiler.ILAst @@ -147,7 +147,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()) {
if (inlinedExpression.HasNoSideEffects() && v.IsGenerated) {
// Remove completely
body.RemoveAt(pos);
return true;

Loading…
Cancel
Save