From 0e56e48731883e281c53595f2c5168fb7749361a Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sat, 7 Mar 2020 16:05:58 +0100 Subject: [PATCH] Restore compilability with ltsmaster via deprecated body keyword Instead of `do` introduced with 2.075. We don't enable deprecations when building the compiler, so it doesn't really matter. --- dmd/compiler.d | 2 +- dmd/mars.d | 7 +++++++ dmd/objc.d | 10 +++++----- dmd/root/man.d | 6 +++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dmd/compiler.d b/dmd/compiler.d index 91e792948fa..c2c04ea35cb 100644 --- a/dmd/compiler.d +++ b/dmd/compiler.d @@ -187,7 +187,7 @@ private struct ModuleComponentRange */ private bool includeImportedModuleCheck(ModuleComponentRange components) in { assert(includeImports); } -do +body { createMatchNodes(); size_t nodeIndex = 0; diff --git a/dmd/mars.d b/dmd/mars.d index 005fa7e9a2e..99e3f31fef5 100644 --- a/dmd/mars.d +++ b/dmd/mars.d @@ -1036,14 +1036,21 @@ version (NoMain) {} else // When using a C main, host DMD may not link against host druntime by default. version (DigitalMars) { + // IN_LLVM: extra curly braces for ltsmaster compilability... version (Win64) + { pragma(lib, "phobos64"); + } else version (Win32) { version (CRuntime_Microsoft) + { pragma(lib, "phobos32mscoff"); + } else + { pragma(lib, "phobos"); + } } } diff --git a/dmd/objc.d b/dmd/objc.d index 4fb2b866e32..c473f6dcd8c 100644 --- a/dmd/objc.d +++ b/dmd/objc.d @@ -502,7 +502,7 @@ else { assert(id.classKind == ClassKind.objc); } - do + body { // don't report deprecations for the metaclass to avoid duplicated // messages. @@ -576,7 +576,7 @@ else assert(fd.selector); assert(fd.isMember); } - do + body { // * final member functions are kept virtual with Objective-C linkage // because the Objective-C runtime always use dynamic dispatch. @@ -591,7 +591,7 @@ else { assert(metaclass); } - do + body { if (cd.classKind == ClassKind.objc && fd.isStatic && !cd.objc.isMeta) return cd.objc.metaclass; @@ -604,7 +604,7 @@ else { assert(fd.parent.isClassDeclaration); } - do + body { if (cd.classKind != ClassKind.objc) return; @@ -642,7 +642,7 @@ else { assert(fd.selectorParameter is null); } - do + body { if (!fd.selector) return null; diff --git a/dmd/root/man.d b/dmd/root/man.d index ce80b743865..0b78d6d6cda 100644 --- a/dmd/root/man.d +++ b/dmd/root/man.d @@ -27,7 +27,7 @@ version (Windows) { assert(strncmp(url, "http://", 7) == 0 || strncmp(url, "https://", 8) == 0); } - do + body { ShellExecuteA(null, "open", url, null, null, SW_SHOWNORMAL); } @@ -39,7 +39,7 @@ else version (OSX) { assert(strncmp(url, "http://", 7) == 0 || strncmp(url, "https://", 8) == 0); } - do + body { pid_t childpid; const(char)*[5] args; @@ -73,7 +73,7 @@ else version (Posix) { assert(strncmp(url, "http://", 7) == 0 || strncmp(url, "https://", 8) == 0); } - do + body { pid_t childpid; const(char)*[3] args;