mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 13:23:14 +01:00
Fixed codegen of SwitchErrorStatement
This commit is contained in:
@@ -837,7 +837,7 @@ static LLValue* call_string_switch_runtime(llvm::Value* table, Expression* e)
|
||||
fname = "_d_switch_dstring";
|
||||
}
|
||||
else {
|
||||
llvm_unreachable("not char/wchar/dchar");
|
||||
llvm_unreachable("not char/wchar/dchar");
|
||||
}
|
||||
|
||||
llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, fname);
|
||||
@@ -1631,9 +1631,12 @@ void SwitchErrorStatement::toIR(IRState* p)
|
||||
args.push_back(c);
|
||||
|
||||
// call
|
||||
gIR->CreateCallOrInvoke(fn, args);
|
||||
LLCallSite call = gIR->CreateCallOrInvoke(fn, args);
|
||||
call.setDoesNotReturn();
|
||||
|
||||
#if DMDV1
|
||||
gIR->ir->CreateUnreachable();
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user