Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2018-04-13 02:19:00 +0300
committerGitHub <noreply@github.com>2018-04-13 02:19:00 +0300
commit753b12932bf934605d40901d5e10c67e1e1a34fd (patch)
treee00e99f1228545d2ce942d3d91c59cbe68d7a4b6 /src/ILCompiler.MetadataTransform
parent657a36664050c9c5f0053a341d5f99b5d6588dd6 (diff)
Fix metadata generation for null string constants (#5690)
This should take the code path that returns `ConstantReferenceValue`.
Diffstat (limited to 'src/ILCompiler.MetadataTransform')
-rw-r--r--src/ILCompiler.MetadataTransform/src/ILCompiler/Metadata/Transform.CustomAttribute.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ILCompiler.MetadataTransform/src/ILCompiler/Metadata/Transform.CustomAttribute.cs b/src/ILCompiler.MetadataTransform/src/ILCompiler/Metadata/Transform.CustomAttribute.cs
index ecf9532e7..31f61c5e8 100644
--- a/src/ILCompiler.MetadataTransform/src/ILCompiler/Metadata/Transform.CustomAttribute.cs
+++ b/src/ILCompiler.MetadataTransform/src/ILCompiler/Metadata/Transform.CustomAttribute.cs
@@ -117,14 +117,14 @@ namespace ILCompiler.Metadata
return new ConstantUInt64Value { Value = (ulong)value };
}
- if (type.IsString)
+ if (value == null)
{
- return HandleString((string)value);
+ return new ConstantReferenceValue();
}
- if (value == null)
+ if (type.IsString)
{
- return new ConstantReferenceValue();
+ return HandleString((string)value);
}
if (type.IsSzArray)