mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 11:26:02 +03:00
remove default fatel handler
This commit is contained in:
parent
afe4b9f680
commit
b534e59fb8
2 changed files with 1 additions and 7 deletions
|
@ -18,6 +18,7 @@ void fatal(const Context &context, const std::string &reason)
|
|||
}
|
||||
else {
|
||||
fprintf(stderr, "Runtime compiler fatal: %s\n", reason.c_str());
|
||||
fflush(stderr);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ void compileDynamicCode(in CompilerSettings settings = CompilerSettings.init)
|
|||
context.optLevel = settings.optLevel;
|
||||
context.sizeLevel = settings.sizeLevel;
|
||||
|
||||
context.fatalHandler = &defaultFatalHandler;
|
||||
if (settings.dumpHandler !is null)
|
||||
{
|
||||
context.dumpHandler = &delegateWrapper!(const char*, size_t);
|
||||
|
@ -37,12 +36,6 @@ void delegateWrapper(T...)(void* context, T params)
|
|||
(*del)(params);
|
||||
}
|
||||
|
||||
void defaultFatalHandler(void*, const char* reason)
|
||||
{
|
||||
import std.conv;
|
||||
throw new Error(reason.text.idup);
|
||||
}
|
||||
|
||||
// must be synchronized with cpp
|
||||
align(1) struct Context
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue