From 499c58f443e97198c30776f54bc57ea2af48245d Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sat, 22 Mar 2025 10:26:47 +0100 Subject: libphobos: Add module declaration to rt.invariant This prevents conflicts with a user-provided `invariant.d' module. gcc/d/ChangeLog: * runtime.def (INVARIANT): Update signature of run-time function. libphobos/ChangeLog: * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Rename rt/invariant.d to rt/invariant_.d. * libdruntime/Makefile.in: Regenerate. * libdruntime/rt/invariant.d: Move to... * libdruntime/rt/invariant_.d: ...here. --- gcc/d/runtime.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/d/runtime.def b/gcc/d/runtime.def index e426194..4aff0a6 100644 --- a/gcc/d/runtime.def +++ b/gcc/d/runtime.def @@ -142,8 +142,8 @@ DEF_D_RUNTIME (CXA_END_CATCH, "__cxa_end_catch", RT(VOID), P0(), 0) /* When invariant() contracts are turned on, used after testing whether a class != null for validating the state of a class. */ -DEF_D_RUNTIME (INVARIANT, "_D9invariant12_d_invariantFC6ObjectZv", RT(VOID), - P1(OBJECT), 0) +DEF_D_RUNTIME (INVARIANT, "_D2rt10invariant_12_d_invariantFC6ObjectZv", + RT(VOID), P1(OBJECT), 0) #undef P0 #undef P1 -- cgit v1.1