[tools] Remove some dead code in the class redirector rewriter. (#18695)

This also fixes a compiler warnings:

> tools/common/Rewriter.cs(333,25): warning CS8604: Possible null
reference argument for parameter 'path1' in 'string Path.Combine(string
path1, string path2)'.

And make nullability warnings in dotnet-linker show up as errors to
prevent future introduction of nullability warnings.
This commit is contained in:
Rolf Bjarne Kvinge 2023-08-14 11:49:06 +02:00 коммит произвёл GitHub
Родитель 24895406b2
Коммит 4c115b037b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -20,7 +20,6 @@ namespace ClassRedirector {
const string classPtrName = "class_ptr";
CSToObjCMap map;
string pathToXamarinAssembly;
string? outputDirectory = null;
Dictionary<string, FieldDefinition> csTypeToFieldDef = new Dictionary<string, FieldDefinition> ();
IEnumerable<AssemblyDefinition> assemblies;
AssemblyDefinition xamarinAssembly;
@ -328,11 +327,6 @@ namespace ClassRedirector {
}
}
string ToOutputFileName (string pathToInputFileName)
{
return Path.Combine (outputDirectory, Path.GetFileName (pathToInputFileName));
}
void MarkForSave (AssemblyDefinition assembly)
{
var annotations = linkContext.Annotations;

Просмотреть файл

@ -4,6 +4,7 @@
<RootNamespace>dotnet_linker</RootNamespace>
<DefineConstants>$(DefineConstants);BUNDLER</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>
<Import Project="..\..\eng\Versions.props" />