From f68775e468cc86e02db68c60b2385b68efac5fe2 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 28 Apr 2011 18:58:51 +0200 Subject: [PATCH] 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. --- ICSharpCode.Decompiler/ILAst/ILInlining.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/ILAst/ILInlining.cs b/ICSharpCode.Decompiler/ILAst/ILInlining.cs index 01427b93e..76fde12bf 100644 --- a/ICSharpCode.Decompiler/ILAst/ILInlining.cs +++ b/ICSharpCode.Decompiler/ILAst/ILInlining.cs @@ -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;