299 references to Platform
Microsoft.CodeAnalysis (27)
Compilation\Compilation.cs (10)
2196
Platform
platform = compilationOptions.Platform;
2201
platform =
Platform
.AnyCpu;
2270
case
Platform
.Arm64:
2274
case
Platform
.Arm:
2278
case
Platform
.X64:
2282
case
Platform
.Itanium:
2286
case
Platform
.X86:
2290
case
Platform
.AnyCpu:
2291
case
Platform
.AnyCpu32BitPreferred:
2301
corFlags: GetCorHeaderFlags(machine, HasStrongName, prefers32Bit: platform ==
Platform
.AnyCpu32BitPreferred),
Compilation\CompilationOptions.cs (4)
132
public
Platform
Platform { get; protected set; }
280
Platform
platform,
438
public CompilationOptions WithPlatform(
Platform
platform)
531
protected abstract CompilationOptions CommonWithPlatform(
Platform
platform);
Compilation\Platform.cs (9)
47
internal static bool IsValid(this
Platform
value)
49
return value >=
Platform
.AnyCpu && value <=
Platform
.Arm64;
52
internal static bool Requires64Bit(this
Platform
value)
54
return value ==
Platform
.X64 || value ==
Platform
.Itanium || value ==
Platform
.Arm64;
57
internal static bool Requires32Bit(this
Platform
value)
59
return value ==
Platform
.X86;
Compilation\SubsystemVersion.cs (2)
154
internal static SubsystemVersion Default(OutputKind outputKind,
Platform
platform)
156
if (platform ==
Platform
.Arm)
Emit\EmitOptions.cs (1)
55
/// If the value is 0 the file alignment is determined based upon the value of <see cref="
Platform
"/>.
PEWriter\MetadataWriter.PortablePdb.cs (1)
923
var
platform = module.CommonCompilation.Options.Platform;
Microsoft.CodeAnalysis.CSharp (27)
CommandLine\CSharpCommandLineParser.cs (11)
94
Platform
platform =
Platform
.AnyCpu;
1800
private static
Platform
ParsePlatform(string value, IList<Diagnostic> diagnostics)
1805
return
Platform
.X86;
1807
return
Platform
.X64;
1809
return
Platform
.Itanium;
1811
return
Platform
.AnyCpu;
1813
return
Platform
.AnyCpu32BitPreferred;
1815
return
Platform
.Arm;
1817
return
Platform
.Arm64;
1820
return
Platform
.AnyCpu;
CSharpCompilationOptions.cs (11)
62
Platform
platform =
Platform
.AnyCpu,
112
Platform
platform,
157
Platform
platform,
199
Platform
platform,
423
public new CSharpCompilationOptions WithPlatform(
Platform
platform)
629
protected override CompilationOptions CommonWithPlatform(
Platform
platform) => WithPlatform(platform);
715
if (Platform ==
Platform
.AnyCpu32BitPreferred && OutputKind.IsValid() && !(OutputKind == OutputKind.ConsoleApplication || OutputKind == OutputKind.WindowsApplication || OutputKind == OutputKind.WindowsRuntimeApplication))
828
Platform
platform,
867
Platform
platform,
911
Platform
platform,
Symbols\Source\SourceModuleSymbol.cs (5)
91
case
Platform
.Arm:
93
case
Platform
.X64:
95
case
Platform
.Arm64:
97
case
Platform
.Itanium:
109
return DeclaringCompilation.Options.Platform ==
Platform
.X86;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (17)
CommandLineTests.cs (17)
4523
Assert.Equal(
Platform
.X64, parsedArgs.CompilationOptions.Platform);
4527
Assert.Equal(
Platform
.X86, parsedArgs.CompilationOptions.Platform);
4532
Assert.Equal(
Platform
.AnyCpu, parsedArgs.CompilationOptions.Platform);
4536
Assert.Equal(
Platform
.Itanium, parsedArgs.CompilationOptions.Platform);
4540
Assert.Equal(
Platform
.AnyCpu, parsedArgs.CompilationOptions.Platform);
4544
Assert.Equal(
Platform
.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform);
4548
Assert.Equal(
Platform
.Arm, parsedArgs.CompilationOptions.Platform);
4554
Assert.Equal(
Platform
.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default
4560
Assert.Equal(
Platform
.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default
11715
var csc32 = CreateCompilationWithMscorlib46(csc32src, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X86), assemblyName: "csc32");
12435
var list = new List<Tuple<string,
Platform
>>()
12437
Tuple.Create("x86",
Platform
.X86),
12438
Tuple.Create("x64",
Platform
.X64),
12439
Tuple.Create("itanium",
Platform
.Itanium),
12440
Tuple.Create("anycpu",
Platform
.AnyCpu),
12441
Tuple.Create("anycpu32bitpreferred",
Platform
.AnyCpu32BitPreferred),
12442
Tuple.Create("arm",
Platform
.Arm)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (85)
Emit\CompilationEmitTests.cs (51)
2034
WithPlatform(
Platform
.Arm64).
3485
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.AnyCpu));
3489
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X86));
3493
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X64));
3499
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.AnyCpu32BitPreferred));
3505
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.Arm));
3523
options: TestOptions.DebugDll.WithPlatform(
Platform
.X86));
3557
options: TestOptions.DebugDll.WithPlatform(
Platform
.X64));
3607
options: TestOptions.DebugDll.WithPlatform(
Platform
.Arm));
3647
options: TestOptions.ReleaseExe.WithPlatform(
Platform
.AnyCpu));
3688
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X64));
3771
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X86));
3776
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X86));
3781
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X86));
3785
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X64));
3790
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X64));
3795
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(
Platform
.X64));
4678
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium), assemblyName: "PlatformMismatch");
4692
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu));
4698
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu));
4704
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu));
4710
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu));
4716
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.X86));
4724
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.X86));
4732
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.X86));
4740
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.X86));
4763
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium), assemblyName: "PlatformMismatch");
4776
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu));
4784
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.X86));
4792
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu));
4808
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.X86), assemblyName: "PlatformMismatch");
4823
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4831
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4839
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
4847
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
4864
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.X86), assemblyName: "PlatformMismatch");
4878
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4895
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu), assemblyName: "PlatformMismatch");
4910
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4916
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4922
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
4928
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
4943
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu), assemblyName: "PlatformMismatch");
4957
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4972
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium), assemblyName: "PlatformMismatch");
4987
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4993
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
4999
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
5005
parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium));
5020
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium), assemblyName: "PlatformMismatch");
5035
parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium));
Emit\DeterministicTests.cs (26)
29
private Guid CompiledGuid(string source, string assemblyName, bool debug,
Platform
platform =
Platform
.AnyCpu)
34
private Guid CompiledGuid(string source, string assemblyName, CSharpCompilationOptions options, EmitOptions emitOptions = null,
Platform
platform =
Platform
.AnyCpu)
51
private (ImmutableArray<byte> pe, ImmutableArray<byte> pdb) EmitDeterministic(string source,
Platform
platform, DebugInformationFormat pdbFormat, bool optimize)
131
var mvid1 = CompiledGuid(source, "X1", false,
Platform
.X86);
132
var mvid2 = CompiledGuid(source, "X1", false,
Platform
.X86);
135
var mvid3 = CompiledGuid(source, "X1", false,
Platform
.X64);
136
var mvid4 = CompiledGuid(source, "X1", false,
Platform
.X64);
139
var mvid5 = CompiledGuid(source, "X1", false,
Platform
.Arm64);
140
var mvid6 = CompiledGuid(source, "X1", false,
Platform
.Arm64);
152
var result1 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.X64, DebugInformationFormat.Embedded, optimize: false);
153
var result2 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.Arm64, DebugInformationFormat.Embedded, optimize: false);
218
var result1 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.AnyCpu32BitPreferred, pdbFormat, optimize: true);
219
var result2 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.AnyCpu32BitPreferred, pdbFormat, optimize: true);
223
var result3 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.X64, pdbFormat, optimize: true);
224
var result4 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.X64, pdbFormat, optimize: true);
228
var result5 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.Arm64, pdbFormat, optimize: true);
229
var result6 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.Arm64, pdbFormat, optimize: true);
245
var result1 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.AnyCpu32BitPreferred, pdbFormat, optimize: false);
246
var result2 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.AnyCpu32BitPreferred, pdbFormat, optimize: false);
250
var result3 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.X64, pdbFormat, optimize: false);
251
var result4 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.X64, pdbFormat, optimize: false);
255
var result5 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.Arm64, pdbFormat, optimize: false);
256
var result6 = EmitDeterministic(CompareAllBytesEmitted_Source,
Platform
.Arm64, pdbFormat, optimize: false);
477
.WithPlatform(
Platform
.AnyCpu)
Emit\EmitMetadataTests.cs (8)
2212
VerifyEmitWithNoResources(comp,
Platform
.AnyCpu);
2213
VerifyEmitWithNoResources(comp,
Platform
.AnyCpu32BitPreferred);
2214
VerifyEmitWithNoResources(comp,
Platform
.Arm); // broken before fix
2215
VerifyEmitWithNoResources(comp,
Platform
.Itanium); // broken before fix
2216
VerifyEmitWithNoResources(comp,
Platform
.X64); // broken before fix
2217
VerifyEmitWithNoResources(comp,
Platform
.X86);
2220
private void VerifyEmitWithNoResources(CSharpCompilation comp,
Platform
platform)
2423
options: TestOptions.DebugExe.WithPlatform(
Platform
.X64).WithDeterministic(true),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
320
platform:
Platform
.AnyCpu,
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
64
platform:
Platform
.AnyCpu,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CSharpCompilationOptionsTests.cs (10)
83
TestHiddenProperty((old, value) => old.WithPlatform(value), opt => opt.Platform,
Platform
.Itanium);
121
TestProperty((old, value) => old.WithPlatform(value), opt => opt.Platform,
Platform
.Itanium);
184
new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((
Platform
)Int32.MaxValue).VerifyErrors(
188
new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((
Platform
)Int32.MinValue).VerifyErrors(
334
new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform: (
Platform
)Int32.MinValue).VerifyErrors(
345
new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform:
Platform
.AnyCpu32BitPreferred).VerifyErrors();
347
new CSharpCompilationOptions(OutputKind.WindowsRuntimeApplication, platform:
Platform
.AnyCpu32BitPreferred).VerifyErrors();
349
new CSharpCompilationOptions(OutputKind.WindowsRuntimeMetadata, platform:
Platform
.AnyCpu32BitPreferred).VerifyErrors(
352
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, platform:
Platform
.AnyCpu32BitPreferred).VerifyErrors(
396
Platform
platform = 0;
Microsoft.CodeAnalysis.Rebuild (4)
CompilationFactory.cs (4)
208
protected static
Platform
GetPlatform(string? platform)
210
?
Platform
.AnyCpu
211
: (
Platform
)Enum.Parse(typeof(
Platform
), platform);
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
OptionRoundTripTests.cs (4)
33
public static readonly object[][] Platforms = ((
Platform
[])Enum.GetValues(typeof(
Platform
))).Select(p => new[] { (object)p }).ToArray();
37
public void Platform_RoundTrip(
Platform
platform)
49
public void Platform_RoundTrip_VB(
Platform
platform)
Microsoft.CodeAnalysis.VisualBasic (27)
CommandLine\VisualBasicCommandLineParser.vb (11)
141
Dim platform As
Platform
=
Platform
.AnyCpu
2147
Private Shared Function ParsePlatform(name As String, value As String, errors As List(Of Diagnostic)) As
Platform
2153
Return
Platform
.X86
2155
Return
Platform
.X64
2157
Return
Platform
.Itanium
2159
Return
Platform
.AnyCpu
2161
Return
Platform
.AnyCpu32BitPreferred
2163
Return
Platform
.Arm
2165
Return
Platform
.Arm64
2171
Return
Platform
.AnyCpu
Symbols\Source\SourceModuleSymbol.vb (5)
107
Case
Platform
.Arm64
109
Case
Platform
.Arm
111
Case
Platform
.X64
113
Case
Platform
.Itanium
123
Return DeclaringCompilation.Options.Platform =
Platform
.X86
VisualBasicCompilationOptions.vb (11)
87
Optional platform As
Platform
=
Platform
.AnyCpu,
164
platform As
Platform
,
233
platform As
Platform
,
787
Public Shadows Function WithPlatform(value As
Platform
) As VisualBasicCompilationOptions
987
Protected Overrides Function CommonWithPlatform(platform As
Platform
) As CompilationOptions
1066
If Platform =
Platform
.AnyCpu32BitPreferred AndAlso OutputKind.IsValid() AndAlso
1163
platform As
Platform
,
1228
platform As
Platform
,
1294
Optional platform As
Platform
=
Platform
.AnyCpu,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (65)
Emit\CompilationEmitTests.vb (46)
2085
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.X86))
2089
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.X64))
2095
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.AnyCpu32BitPreferred))
2114
Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(
Platform
.AnyCpu))
2139
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.AnyCpu))
2175
Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(
Platform
.Arm))
2200
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.AnyCpu))
2236
Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(
Platform
.X64))
2256
compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(
Platform
.X64))
2344
compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(
Platform
.X86))
2348
compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(
Platform
.X64))
2352
compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithPlatform(
Platform
.X64))
3860
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
3877
TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu))
3883
TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu))
3889
TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu))
3895
TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu))
3901
TestOptions.ReleaseDll.WithPlatform(
Platform
.X86))
3910
TestOptions.ReleaseDll.WithPlatform(
Platform
.X86))
3919
TestOptions.ReleaseModule.WithPlatform(
Platform
.X86))
3928
TestOptions.ReleaseModule.WithPlatform(
Platform
.X86))
3952
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
3968
TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu))
3977
TestOptions.ReleaseDll.WithPlatform(
Platform
.X86))
3986
TestOptions.ReleaseModule.WithPlatform(
Platform
.X86))
4003
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(
Platform
.X86))
4020
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4029
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4038
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4047
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4065
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(
Platform
.X86))
4081
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4099
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(
Platform
.AnyCpu))
4116
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4124
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4132
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4140
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4157
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(
Platform
.AnyCpu))
4173
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4190
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4207
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4215
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
4223
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4231
TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4248
Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(
Platform
.Itanium))
4264
TestOptions.ReleaseDll.WithPlatform(
Platform
.Itanium))
Emit\DeterministicTests.vb (11)
19
Private Function GetBytesEmitted(source As String, platform As
Platform
, debug As Boolean) As ImmutableArray(Of Byte)
61
Dim result1 = GetBytesEmitted(source, platform:=
Platform
.AnyCpu32BitPreferred, debug:=False)
62
Dim result2 = GetBytesEmitted(source, platform:=
Platform
.AnyCpu32BitPreferred, debug:=False)
65
Dim result3 = GetBytesEmitted(source, platform:=
Platform
.X64, debug:=False)
66
Dim result4 = GetBytesEmitted(source, platform:=
Platform
.X64, debug:=False)
69
Dim result5 = GetBytesEmitted(source, platform:=
Platform
.Arm64, debug:=False)
70
Dim result6 = GetBytesEmitted(source, platform:=
Platform
.Arm64, debug:=False)
83
Dim result1 = GetBytesEmitted(source, platform:=
Platform
.AnyCpu32BitPreferred, debug:=True)
84
Dim result2 = GetBytesEmitted(source, platform:=
Platform
.AnyCpu32BitPreferred, debug:=True)
87
Dim result3 = GetBytesEmitted(source, platform:=
Platform
.X64, debug:=True)
88
Dim result4 = GetBytesEmitted(source, platform:=
Platform
.X64, debug:=True)
Emit\EmitMetadata.vb (7)
964
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu"),
Platform
.AnyCpu)
965
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu32BitPreferred"),
Platform
.AnyCpu32BitPreferred)
966
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Arm"),
Platform
.Arm) ' broken before fix
967
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Itanium"),
Platform
.Itanium) ' broken before fix
968
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X64"),
Platform
.X64) ' broken before fix
969
VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X86"),
Platform
.X86)
972
Private Sub VerifyEmitWithNoResources(comp As VisualBasicCompilation, platform As
Platform
)
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
208
platform:=
Platform
.AnyCpu,
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
CompilationExtensions.vb (1)
116
platform:=
Platform
.AnyCpu, ' Platform should match PEModule.Machine, in this case I386.
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Compilation\VisualBasicCompilationOptionsTests.vb (6)
37
TestHiddenProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform,
Platform
.X64)
112
TestProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform,
Platform
.X64)
194
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MaxValue,
Platform
)).Errors,
199
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MinValue,
Platform
)).Errors,
297
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MaxValue,
Platform
)).Errors,
302
AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MinValue,
Platform
)).Errors,
Microsoft.CodeAnalysis.Workspaces (3)
Serialization\AbstractOptionsSerializationService.cs (3)
89
Platform
platform,
124
var
platform = (
Platform
)reader.ReadInt32();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
VisualStudioMSBuildWorkspaceTests.cs (10)
492
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
507
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
521
Assert.Equal(
Platform
.AnyCpu32BitPreferred, compilation.Options.Platform);
536
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
551
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
616
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
631
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
645
Assert.Equal(
Platform
.AnyCpu32BitPreferred, compilation.Options.Platform);
660
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
675
Assert.Equal(
Platform
.AnyCpu, compilation.Options.Platform);
Microsoft.VisualStudio.LanguageServices (7)
Interactive\VsResetInteractive.cs (7)
167
private static InteractiveHostPlatform? GetInteractiveHostPlatform(string targetFrameworkMoniker,
Platform
platform)
177
case
Platform
.Arm:
178
case
Platform
.AnyCpu32BitPreferred:
179
case
Platform
.X86:
182
case
Platform
.Itanium:
183
case
Platform
.X64:
184
case
Platform
.Arm64:
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
126
if (!Enum.TryParse(GetStringOption(CompilerOptions.OPTID_PLATFORM, ""), ignoreCase: true, result: out
Platform
platform))
128
platform =
Platform
.AnyCpu;
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
59
Dim platform As
Platform
61
platform =
Platform
.AnyCpu