mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Solaris: fix assert for betterC build. (#2566)
* Solaris: fix assert for betterC build. * Added parens to avoid relying on operator precedence rules.
This commit is contained in:
parent
66a19de8ed
commit
907dae171a
2 changed files with 13 additions and 1 deletions
|
@ -311,6 +311,14 @@ void DtoCAssert(Module *M, Loc &loc, LLValue *msg) {
|
|||
args.push_back(file);
|
||||
args.push_back(line);
|
||||
args.push_back(msg);
|
||||
} else if (global.params.targetTriple->isOSSolaris()) {
|
||||
const auto irFunc = gIR->func();
|
||||
const auto funcName =
|
||||
(irFunc && irFunc->decl) ? irFunc->decl->toPrettyChars() : "";
|
||||
args.push_back(msg);
|
||||
args.push_back(file);
|
||||
args.push_back(line);
|
||||
args.push_back(DtoConstCString(funcName));
|
||||
} else if (global.params.targetTriple->getEnvironment() ==
|
||||
llvm::Triple::Android) {
|
||||
args.push_back(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue