提交 09cc94fd 编写于 作者: V VSadov

renamed SynthesizeTupleNamesAttribute to have no "Opt"

上级 0583f0d7
......@@ -499,7 +499,7 @@ internal SynthesizedAttributeData SynthesizeDynamicAttribute(TypeSymbol type, in
}
}
internal SynthesizedAttributeData SynthesizeTupleNamesAttributeOpt(TypeSymbol type)
internal SynthesizedAttributeData SynthesizeTupleNamesAttribute(TypeSymbol type)
{
Debug.Assert((object)type != null);
Debug.Assert(type.ContainsTuple());
......
......@@ -304,7 +304,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
if (Type.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes,
DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type));
DeclaringCompilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -468,7 +468,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
if (Type.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes,
DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type));
DeclaringCompilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -960,7 +960,7 @@ internal override void AddSynthesizedReturnTypeAttributes(ref ArrayBuilder<Synth
if (ReturnType.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes,
DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(ReturnType));
DeclaringCompilation.SynthesizeTupleNamesAttribute(ReturnType));
}
}
......
......@@ -1091,7 +1091,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
if (baseType.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes, compilation.SynthesizeTupleNamesAttributeOpt(baseType));
AddSynthesizedAttribute(ref attributes, compilation.SynthesizeTupleNamesAttribute(baseType));
}
}
}
......
......@@ -85,7 +85,7 @@ internal sealed override void AddSynthesizedAttributes(ModuleCompilationState co
if (Type.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes,
compilation.SynthesizeTupleNamesAttributeOpt(Type));
compilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -1053,7 +1053,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
if (Type.ContainsTupleNames())
{
AddSynthesizedAttribute(ref attributes,
DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type));
DeclaringCompilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -62,7 +62,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
compilation.CanEmitSpecialType(SpecialType.System_String))
{
AddSynthesizedAttribute(ref attributes,
compilation.SynthesizeTupleNamesAttributeOpt(Type));
compilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -92,7 +92,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
compilation.CanEmitSpecialType(SpecialType.System_String))
{
AddSynthesizedAttribute(ref attributes,
compilation.SynthesizeTupleNamesAttributeOpt(ReturnType));
compilation.SynthesizeTupleNamesAttribute(ReturnType));
}
}
......
......@@ -169,7 +169,7 @@ internal override void AddSynthesizedAttributes(ModuleCompilationState compilati
compilation.CanEmitSpecialType(SpecialType.System_String))
{
AddSynthesizedAttribute(ref attributes,
compilation.SynthesizeTupleNamesAttributeOpt(Type));
compilation.SynthesizeTupleNamesAttribute(Type));
}
}
......
......@@ -1472,7 +1472,7 @@ private static bool NormalizeTaskTypesInPointer(CSharpCompilation compilation, r
{
if (type.ContainsTupleNames())
{
var attr = declaringCompilation.SynthesizeTupleNamesAttributeOpt(type);
var attr = declaringCompilation.SynthesizeTupleNamesAttribute(type);
if (attr != null)
{
return new Cci.TypeReferenceWithAttributes(
......
......@@ -749,7 +749,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
MyBase.AddSynthesizedAttributes(compilationState, attributes)
If Me.Type.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttribute(Type))
End If
End Sub
End Class
......
......@@ -282,7 +282,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End If
If Me.Type.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttribute(Type))
End If
End Sub
......
......@@ -1448,7 +1448,7 @@ lReportErrorOnTwoTokens:
MyBase.AddSynthesizedReturnTypeAttributes(attributes)
If Me.ReturnType.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Me.ReturnType))
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttribute(Me.ReturnType))
End If
End Sub
......
......@@ -2443,7 +2443,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Dim baseType As NamedTypeSymbol = Me.BaseTypeNoUseSiteDiagnostics
If baseType IsNot Nothing Then
If baseType.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttributeOpt(baseType))
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttribute(baseType))
End If
End If
End Sub
......
......@@ -66,7 +66,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End If
If Me.Type.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttribute(Type))
End If
End Sub
......
......@@ -1194,7 +1194,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
MyBase.AddSynthesizedAttributes(compilationState, attributes)
If Me.Type.ContainsTupleNames() Then
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, DeclaringCompilation.SynthesizeTupleNamesAttribute(Type))
End If
End Sub
End Class
......
......@@ -64,7 +64,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
compilation.HasTupleNamesAttributes AndAlso
compilation.CanEmitSpecialType(SpecialType.System_String) Then
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttribute(Type))
End If
Dim sourceType = TryCast(ContainingSymbol, SourceMemberContainerTypeSymbol)
......
......@@ -136,7 +136,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
compilation.HasTupleNamesAttributes AndAlso
compilation.CanEmitSpecialType(SpecialType.System_String) Then
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttributeOpt(Type))
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttribute(Type))
End If
End Sub
......
......@@ -194,7 +194,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
compilation.HasTupleNamesAttributes AndAlso
compilation.CanEmitSpecialType(SpecialType.System_String) Then
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttributeOpt(Me.ReturnType))
AddSynthesizedAttribute(attributes, compilation.SynthesizeTupleNamesAttribute(Me.ReturnType))
End If
End Sub
......
......@@ -1321,7 +1321,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
<Extension>
Friend Function GetTypeRefWithAttributes(type As TypeSymbol, declaringCompilation As VisualBasicCompilation, typeRef As Cci.ITypeReference) As Cci.TypeReferenceWithAttributes
If type.ContainsTupleNames() Then
Dim attr = declaringCompilation.SynthesizeTupleNamesAttributeOpt(type)
Dim attr = declaringCompilation.SynthesizeTupleNamesAttribute(type)
If attr IsNot Nothing Then
Return New Cci.TypeReferenceWithAttributes(
typeRef,
......
......@@ -654,7 +654,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Function SynthesizeTupleNamesAttributeOpt(type As TypeSymbol) As SynthesizedAttributeData
Friend Function SynthesizeTupleNamesAttribute(type As TypeSymbol) As SynthesizedAttributeData
Debug.Assert(type IsNot Nothing)
Debug.Assert(type.ContainsTuple())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册