From c8a8fb528d3848d2fb72b14084768a96820759d3 Mon Sep 17 00:00:00 2001 From: jbevain Date: Fri, 5 Mar 2010 17:17:06 +0000 Subject: [PATCH] fix marking of types in custom attributes git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@153123 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- tools/linker/Mono.Linker.Steps/MarkStep.cs | 6 +++++- tools/linker/Mono.Linker/LinkContext.cs | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/linker/Mono.Linker.Steps/MarkStep.cs b/tools/linker/Mono.Linker.Steps/MarkStep.cs index f341931641..c0234e8ad5 100644 --- a/tools/linker/Mono.Linker.Steps/MarkStep.cs +++ b/tools/linker/Mono.Linker.Steps/MarkStep.cs @@ -279,7 +279,11 @@ namespace Mono.Linker.Steps { if (slotType.FullName != Constants.Type) return; - TypeDefinition type = _context.GetType ((string) value); + string type_name = (string) value; + + TypeDefinition type = _context.GetType (slotType.Module, type_name); + if (type == null) + type = _context.GetType (type_name); MarkType (type); } diff --git a/tools/linker/Mono.Linker/LinkContext.cs b/tools/linker/Mono.Linker/LinkContext.cs index 4873df001b..5d9482a3c2 100644 --- a/tools/linker/Mono.Linker/LinkContext.cs +++ b/tools/linker/Mono.Linker/LinkContext.cs @@ -83,6 +83,11 @@ namespace Mono.Linker { _parameters = new Hashtable (); } + public TypeDefinition GetType (ModuleDefinition module, string type) + { + return module.Types [type.Replace ('+', '/')]; + } + public TypeDefinition GetType (string type) { int pos = type.IndexOf (","); -- 2.11.4.GIT