Emit fatal codegen error for unsupported dual-context for now

As long as dlang/dmd#9282 isn't ported to LDC.
This commit is contained in:
Martin Kinkelin 2019-07-28 00:16:55 +02:00
parent 4bcaba71c1
commit d93087ad90

View file

@ -306,7 +306,11 @@ llvm::FunctionType *DtoFunctionType(FuncDeclaration *fdecl) {
} else {
IF_LOG Logger::println("chars: %s type: %s kind: %s", fdecl->toChars(),
fdecl->type->toChars(), fdecl->kind());
llvm_unreachable("needThis, but invalid parent declaration.");
fdecl->error("requires a dual-context, which is not yet supported by LDC");
if (!global.gag)
fatal();
return LLFunctionType::get(LLType::getVoidTy(gIR->context()),
/*isVarArg=*/false);
}
} else if (fdecl->isNested()) {
dnest = Type::tvoid->pointerTo();