Skip to content

Commit ab0de53

Browse files
authored
Escape lower-cased type names (#62507)
1 parent b2dc37b commit ab0de53

File tree

47 files changed

+232
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+232
-255
lines changed

src/coreclr/tools/dotnet-pgo/CommandLineOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal class CommandLineOptions
3333
public bool IncludeFullGraphs;
3434
public int SpgoMinSamples = 50;
3535
public bool VerboseWarnings;
36-
public jittraceoptions JitTraceOptions;
36+
public JitTraceOptions JitTraceOptions;
3737
public double ExcludeEventsBefore;
3838
public double ExcludeEventsAfter;
3939
public bool Warnings;
@@ -211,7 +211,7 @@ void HelpOption()
211211
HelpOption();
212212
}
213213

214-
JitTraceOptions = jittraceoptions.none;
214+
JitTraceOptions = JitTraceOptions.none;
215215
#if DEBUG
216216
// Usage of the jittrace format requires using logic embedded in the runtime repository and isn't suitable for general consumer use at this time
217217
// Build it in debug and check builds to ensure that it doesn't bitrot, and remains available for use by developers willing to build the repo
@@ -230,14 +230,14 @@ void HelpOption()
230230
syntax.DefineOption(name: "sorted", value: ref sorted, help: "Generate sorted output.", requireValue: false);
231231
if (sorted)
232232
{
233-
JitTraceOptions |= jittraceoptions.sorted;
233+
JitTraceOptions |= JitTraceOptions.sorted;
234234
}
235235

236236
bool showtimestamp = false;
237237
syntax.DefineOption(name: "showtimestamp", value: ref showtimestamp, help: "Show timestamps in output.", requireValue: false);
238238
if (showtimestamp)
239239
{
240-
JitTraceOptions |= jittraceoptions.showtimestamp;
240+
JitTraceOptions |= JitTraceOptions.showtimestamp;
241241
}
242242

243243
syntax.DefineOption(name: "includeReadyToRun", value: ref ProcessR2REvents, help: "Include ReadyToRun methods in the trace file.", requireValue: false);

src/coreclr/tools/dotnet-pgo/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public enum PgoFileType
4141
}
4242

4343
[Flags]
44-
public enum jittraceoptions
44+
public enum JitTraceOptions
4545
{
4646
none = 0,
4747
sorted = 1,
@@ -1650,7 +1650,7 @@ void AddToInstrumentationData(int eventClrInstanceId, long methodID, int methodF
16501650
return 0;
16511651
}
16521652

1653-
static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedMethodData> methodsToAttemptToPrepare, jittraceoptions jittraceOptions)
1653+
static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedMethodData> methodsToAttemptToPrepare, JitTraceOptions jittraceOptions)
16541654
{
16551655
PrintMessage($"JitTrace options {jittraceOptions}");
16561656

@@ -1677,7 +1677,7 @@ static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedM
16771677
try
16781678
{
16791679
string timeStampAddon = "";
1680-
if (jittraceOptions.HasFlag(jittraceoptions.showtimestamp))
1680+
if (jittraceOptions.HasFlag(JitTraceOptions.showtimestamp))
16811681
timeStampAddon = time.ToString("F4") + "-";
16821682

16831683
methodPrepareInstruction.Append(CsvEscape(timeStampAddon + method.ToString(), outerCsvEscapeChar));
@@ -1712,7 +1712,7 @@ static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedM
17121712
}
17131713
}
17141714

1715-
if (jittraceOptions.HasFlag(jittraceoptions.sorted))
1715+
if (jittraceOptions.HasFlag(JitTraceOptions.sorted))
17161716
{
17171717
methodsToPrepare.Sort();
17181718
}

src/libraries/Common/src/Interop/Interop.Ldap.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,19 @@ internal sealed class LDAP_TIMEVAL
120120
}
121121

122122
[StructLayout(LayoutKind.Sequential)]
123-
internal sealed class berval
123+
internal sealed class BerVal
124124
{
125125
public int bv_len;
126126
public IntPtr bv_val = IntPtr.Zero;
127127

128-
public berval() { }
128+
public BerVal() { }
129129
}
130130

131131
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
132132
internal sealed class LdapControl
133133
{
134134
public IntPtr ldctl_oid = IntPtr.Zero;
135-
public berval ldctl_value;
135+
public BerVal ldctl_value;
136136
public bool ldctl_iscritical;
137137

138138
public LdapControl() { }

src/libraries/Common/src/Interop/Interop.zlib.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
internal static partial class Interop
88
{
9-
internal static partial class zlib
9+
internal static partial class ZLib
1010
{
1111
[GeneratedDllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateInit2_")]
1212
internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_(

src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal static partial class Ldap
1818
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
1919
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
2020
[DllImport(Libraries.OpenLdap, EntryPoint = "ber_init", CharSet = CharSet.Ansi)]
21-
public static extern IntPtr ber_init(berval value);
21+
public static extern IntPtr ber_init(BerVal value);
2222
#pragma warning restore DLLIMPORTGENANALYZER015
2323

2424
[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ber_free", CharSet = CharSet.Ansi)]

src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static Ldap()
164164
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
165165
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
166166
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_sasl_bind_s", CharSet = CharSet.Ansi)]
167-
internal static extern int ldap_sasl_bind(ConnectionHandle ld, string dn, string mechanism, berval cred, IntPtr serverctrls, IntPtr clientctrls, IntPtr servercredp);
167+
internal static extern int ldap_sasl_bind(ConnectionHandle ld, string dn, string mechanism, BerVal cred, IntPtr serverctrls, IntPtr clientctrls, IntPtr servercredp);
168168
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
169169

170170
[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ldap_sasl_interactive_bind_s", CharSet = CharSet.Ansi)]
@@ -176,7 +176,7 @@ static Ldap()
176176
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
177177
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
178178
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_extended_operation", CharSet = CharSet.Ansi)]
179-
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, berval data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
179+
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, BerVal data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
180180
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
181181

182182
[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ldap_first_attribute", CharSet = CharSet.Ansi)]
@@ -236,7 +236,7 @@ static Ldap()
236236
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
237237
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
238238
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_compare_ext", CharSet = CharSet.Ansi)]
239-
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, berval binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
239+
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, BerVal binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
240240
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
241241
}
242242
}

src/libraries/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
internal static partial class Interop
1111
{
1212
/// <summary>Provides access to some cgroup (v1 and v2) features</summary>
13-
internal static partial class cgroups
13+
internal static partial class @cgroups
1414
{
1515
// For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
1616
// For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt

src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.TryReadStatusFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
internal static partial class Interop
1414
{
15-
internal static partial class procfs
15+
internal static partial class @procfs
1616
{
1717
internal const string RootPath = "/proc/";
1818
private const string StatusFileName = "/status";

src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
internal static partial class Interop
1313
{
14-
internal static partial class procfs
14+
internal static partial class @procfs
1515
{
1616
private const string ExeFileName = "/exe";
1717
private const string CmdLineFileName = "/cmdline";

src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)