mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 11:26:02 +03:00
Never make external variables something else than external.
Fixes crash in DMD testcase 'mangle'.
This commit is contained in:
parent
46b6fdd531
commit
0305d3bce2
1 changed files with 7 additions and 0 deletions
|
@ -1546,6 +1546,13 @@ bool mustDefineSymbol(Dsymbol* s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (VarDeclaration* vd = s->isVarDeclaration())
|
||||||
|
{
|
||||||
|
// Never define 'extern' variables.
|
||||||
|
if (vd->storage_class & STCextern)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Inlining checks may create some variable and class declarations
|
// Inlining checks may create some variable and class declarations
|
||||||
// we don't need to emit.
|
// we don't need to emit.
|
||||||
if (global.inExtraInliningSemantic)
|
if (global.inExtraInliningSemantic)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue