Error instead of assert on delegate literals as constant expressions.

Make function literal linkage internal inside functions and external otherwise.
This commit is contained in:
Christian Kamm
2009-05-27 19:20:18 +02:00
parent e7b3f5415f
commit 7fd43e8bf7
2 changed files with 5 additions and 4 deletions
-3
View File
@@ -265,9 +265,6 @@ LLGlobalValue::LinkageTypes DtoLinkage(Dsymbol* sym)
// extern(C) functions are always external
else if (ft->linkage == LINKc)
return llvm::GlobalValue::ExternalLinkage;
// Function & delegate literals, foreach bodies and lazy parameters: internal linkage
else if (fdecl->isFuncLiteralDeclaration())
return llvm::GlobalValue::InternalLinkage;
}
// class
else if (ClassDeclaration* cd = sym->isClassDeclaration())