Skip to content

Commit 9aaf602

Browse files
authored
[mono] Fix condition for disabling extra checks in verify_class_overrides (#101445)
`ENABLE_CHECKED_BUILD` is defined to mean "Enable additional checks" and is enabled in checked and debug builds. Therefore this performance optimization should be enabled when `ENABLE_CHECKED_BUILD` is *not* defined. Ref: #101312
1 parent 33092b8 commit 9aaf602

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/mono/mono/metadata/class-setup-vtable.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,7 @@ mono_method_get_method_definition (MonoMethod *method)
773773
static gboolean
774774
verify_class_overrides (MonoClass *klass, MonoMethod **overrides, int onum)
775775
{
776-
// on windows and arm, we define NDEBUG for release builds
777-
// on browser and wasi, we define DEBUG for debug builds
778-
#ifdef ENABLE_CHECKED_BUILD
776+
#ifndef ENABLE_CHECKED_BUILD
779777
if (klass->image == mono_defaults.corlib)
780778
return TRUE;
781779
#endif

0 commit comments

Comments
 (0)