Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2

compiles again.
This commit is contained in:
Frits van Bommel
2009-06-08 13:45:26 +02:00
parent b999f679a7
commit 8044a67720
7 changed files with 74 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ FuncDeclaration::FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC s
isArrayOp = false;
allowInlining = false;
availableExternally = true; // assume this unless proven otherwise
// function types in ldc don't merge if the context parameter differs
// so we actually don't care about the function declaration, but only
// what kind of context parameter it has.
@@ -672,6 +674,10 @@ void FuncDeclaration::semantic3(Scope *sc)
return;
semanticRun = 3;
// LDC
if (!global.params.useAvailableExternally)
availableExternally = false;
if (!type || type->ty != Tfunction)
return;
f = (TypeFunction *)(type);