Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream stable #3896

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dmd/expressionsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -5274,7 +5274,12 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
// Perturb the name mangling so that the symbols can co-exist
// instead of colliding
s.localNum = cast(ushort)(originalSymbol.localNum + 1);
assert(s.localNum); // 65535 should be enough for anyone
// 65535 should be enough for anyone
if (!s.localNum)
{
e.error("more than 65535 symbols with name `%s` generated", s.ident.toChars());
return setError();
}

// Replace originalSymbol with s, which updates the localCount
sc.func.localsymtab.update(s);
Expand Down
2 changes: 1 addition & 1 deletion dmd/mtype.d
Original file line number Diff line number Diff line change
Expand Up @@ -6374,7 +6374,7 @@ extern (C++) final class TypeClass : Type
/* Conversion derived to const(base)
*/
int offset = 0;
if (to.isBaseOf(this, &offset) && offset == 0 && MODimplicitConv(mod, to.mod))
if (to.isBaseOf(this, &offset) && MODimplicitConv(mod, to.mod))
{
// Disallow:
// derived to base
Expand Down
14 changes: 10 additions & 4 deletions dmd/vsoptions.d
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,17 @@ public:
*/
const(char)* getVCLibDir(bool x64) const
{
const(char)* proposed;

if (VCToolsInstallDir !is null)
return FileName.combine(VCToolsInstallDir, x64 ? r"lib\x64" : r"lib\x86");
if (VCInstallDir !is null)
return FileName.combine(VCInstallDir, x64 ? r"lib\amd64" : "lib");
return null;
proposed = FileName.combine(VCToolsInstallDir, x64 ? r"lib\x64" : r"lib\x86");
else if (VCInstallDir !is null)
proposed = FileName.combine(VCInstallDir, x64 ? r"lib\amd64" : "lib");

// Due to the possibility of VS being installed with VC directory without the libraries
// we must check that the expected directory does exist.
// It is possible that this isn't the only location a file check is required.
return FileName.exists(proposed) ? proposed : null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion runtime/druntime
Submodule druntime updated 1 files
+3 −3 azure-pipelines.yml
2 changes: 1 addition & 1 deletion runtime/phobos