Permalink
Browse files

Backout compiler generated variable detection as it's not reliable

  • Loading branch information...
1 parent dd64b24 commit 31683823cc504400f65198dc369d69c0a8d5d001 @jbevain committed Mar 26, 2013
@@ -30,17 +30,10 @@ namespace Mono.Cecil.Cil {
public sealed class VariableDefinition : VariableReference {
- bool is_compiler_generated;
-
public bool IsPinned {
get { return variable_type.IsPinned; }
}
- public bool IsCompilerGenerated {
- get { return is_compiler_generated; }
- set { is_compiler_generated = true; }
- }
-
public VariableDefinition (TypeReference variableType)
: base (variableType)
{
@@ -192,7 +192,6 @@ static void ReadScopeAndLocals (PdbScope pdbScope, Scope parent, MethodBody body
var variable = body.Variables [index];
variable.Name = slot.name;
- variable.IsCompilerGenerated = slot.flags == 4;
scope.Variables.Add (variable);
}
@@ -288,7 +287,6 @@ void ReadLocals (PdbScope scope, MethodSymbols symbols)
var variable = symbols.Variables [index];
variable.Name = slot.name;
- variable.IsCompilerGenerated = slot.flags == 4;
}
ReadLocals (scope.scopes, symbols);
@@ -148,7 +148,7 @@ void CreateLocalVariable (VariableDefinition variable, SymbolToken local_var_tok
{
writer.DefineLocalVariable2 (
variable.Name,
- variable.IsCompilerGenerated ? 1 : 0,
+ 0,
local_var_token,
SymAddressKind.ILOffset,
variable.Index,

0 comments on commit 3168382

Please sign in to comment.