mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Fix C assert calls for newlib (#4351)
This commit is contained in:
parent
25dc3fc6eb
commit
d001a7cdb8
3 changed files with 23 additions and 0 deletions
|
@ -317,6 +317,14 @@ void DtoCAssert(Module *M, const Loc &loc, LLValue *msg) {
|
|||
args.push_back(file);
|
||||
args.push_back(line);
|
||||
args.push_back(msg);
|
||||
} else if (global.params.isNewlibEnvironment) {
|
||||
const auto irFunc = gIR->func();
|
||||
const auto funcName =
|
||||
irFunc && irFunc->decl ? irFunc->decl->toPrettyChars() : "";
|
||||
args.push_back(file);
|
||||
args.push_back(line);
|
||||
args.push_back(DtoConstCString(funcName));
|
||||
args.push_back(msg);
|
||||
} else {
|
||||
args.push_back(msg);
|
||||
args.push_back(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue