From fd66fb4b5608d4f013ecf6960d40651df8d22bd9 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 5 Nov 2023 16:13:02 +0100 Subject: [PATCH] Merge fix: Restore Scope::search() as C++ function We need it in `gen/asm-x86.h`. --- dmd/dscope.d | 2 +- dmd/scope.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dmd/dscope.d b/dmd/dscope.d index b8be3b19ef4..b3769593dc1 100644 --- a/dmd/dscope.d +++ b/dmd/dscope.d @@ -349,7 +349,7 @@ version (IN_LLVM) * Returns: * symbol if found, null if not */ - extern (D) Dsymbol search(const ref Loc loc, Identifier ident, Dsymbol* pscopesym, int flags = IgnoreNone) + extern (C++) Dsymbol search(const ref Loc loc, Identifier ident, Dsymbol* pscopesym, int flags = IgnoreNone) { version (LOGSEARCH) { diff --git a/dmd/scope.h b/dmd/scope.h index 1ac51212649..055c01968ac 100644 --- a/dmd/scope.h +++ b/dmd/scope.h @@ -129,4 +129,6 @@ struct Scope AliasDeclaration *aliasAsg; // if set, then aliasAsg is being assigned a new value, // do not set wasRead for it + + Dsymbol *search(const Loc &loc, Identifier *ident, Dsymbol **pscopesym, int flags = IgnoreNone); };