Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/5.0] Leftover Utf8String defines are causing ILLinker warnings #41680

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions src/coreclr/src/vm/corelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,12 @@ DEFINE_CLASS(ENCODING, Text, Encoding)

DEFINE_CLASS(RUNE, Text, Rune)

#ifdef FEATURE_UTF8STRING
DEFINE_CLASS(CHAR8, System, Char8)
#endif // FEATURE_UTF8STRING
// https://github.com/dotnet/runtime/issues/41654 - having DEFINE_CLASS (even under #ifdef) causes an entry
// in System.Private.CoreLib's ILLink.Descriptor.xml which causes warnings
// Use /// comments because CreateRuntimeRootILLinkDescriptorFile will still match `// DEFINE_CLASS`
/// #ifdef FEATURE_UTF8STRING
/// DEFINE_CLASS(CHAR8, System, Char8)
/// #endif // FEATURE_UTF8STRING

DEFINE_CLASS(ENUM, System, Enum)

Expand Down Expand Up @@ -849,16 +852,19 @@ DEFINE_METHOD(STRING, WCSLEN, wcslen,
DEFINE_METHOD(STRING, STRLEN, strlen, SM_PtrByte_RetInt)
DEFINE_PROPERTY(STRING, LENGTH, Length, Int)

#ifdef FEATURE_UTF8STRING
DEFINE_CLASS(UTF8_STRING, System, Utf8String)
DEFINE_METHOD(UTF8_STRING, CTORF_READONLYSPANOFBYTE,Ctor, IM_ReadOnlySpanOfByte_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_READONLYSPANOFCHAR,Ctor, IM_ReadOnlySpanOfChar_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_BYTEARRAY_START_LEN,Ctor, IM_ArrByte_Int_Int_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_BYTEPTR, Ctor, IM_PtrByte_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_CHARARRAY_START_LEN,Ctor, IM_ArrChar_Int_Int_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_CHARPTR, Ctor, IM_PtrChar_RetUtf8Str)
DEFINE_METHOD(UTF8_STRING, CTORF_STRING, Ctor, IM_String_RetUtf8Str)
#endif // FEATURE_UTF8STRING
// https://github.com/dotnet/runtime/issues/41654 - having DEFINE_CLASS (even under #ifdef) causes an entry
// in System.Private.CoreLib's ILLink.Descriptor.xml which causes warnings.
// Use /// comments because CreateRuntimeRootILLinkDescriptorFile will still match `// DEFINE_CLASS`
/// #ifdef FEATURE_UTF8STRING
/// DEFINE_CLASS(UTF8_STRING, System, Utf8String)
/// DEFINE_METHOD(UTF8_STRING, CTORF_READONLYSPANOFBYTE,Ctor, IM_ReadOnlySpanOfByte_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_READONLYSPANOFCHAR,Ctor, IM_ReadOnlySpanOfChar_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_BYTEARRAY_START_LEN,Ctor, IM_ArrByte_Int_Int_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_BYTEPTR, Ctor, IM_PtrByte_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_CHARARRAY_START_LEN,Ctor, IM_ArrChar_Int_Int_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_CHARPTR, Ctor, IM_PtrChar_RetUtf8Str)
/// DEFINE_METHOD(UTF8_STRING, CTORF_STRING, Ctor, IM_String_RetUtf8Str)
/// #endif // FEATURE_UTF8STRING

DEFINE_CLASS(STRING_BUILDER, Text, StringBuilder)
DEFINE_PROPERTY(STRING_BUILDER, LENGTH, Length, Int)
Expand Down