Skip to content

Commit

Permalink
Restore compilability with ltsmaster via deprecated body keyword
Browse files Browse the repository at this point in the history
Instead of `do` introduced with 2.075. We don't enable deprecations when
building the compiler, so it doesn't really matter.
  • Loading branch information
kinke committed Mar 7, 2020
1 parent 2a38dda commit 0e56e48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dmd/compiler.d
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private struct ModuleComponentRange
*/
private bool includeImportedModuleCheck(ModuleComponentRange components)
in { assert(includeImports); }
do
body
{
createMatchNodes();
size_t nodeIndex = 0;
Expand Down
7 changes: 7 additions & 0 deletions dmd/mars.d
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions dmd/objc.d
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ else
{
assert(id.classKind == ClassKind.objc);
}
do
body
{
// don't report deprecations for the metaclass to avoid duplicated
// messages.
Expand Down Expand Up @@ -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.
Expand All @@ -591,7 +591,7 @@ else
{
assert(metaclass);
}
do
body
{
if (cd.classKind == ClassKind.objc && fd.isStatic && !cd.objc.isMeta)
return cd.objc.metaclass;
Expand All @@ -604,7 +604,7 @@ else
{
assert(fd.parent.isClassDeclaration);
}
do
body
{
if (cd.classKind != ClassKind.objc)
return;
Expand Down Expand Up @@ -642,7 +642,7 @@ else
{
assert(fd.selectorParameter is null);
}
do
body
{
if (!fd.selector)
return null;
Expand Down
6 changes: 3 additions & 3 deletions dmd/root/man.d
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0e56e48

Please sign in to comment.