Adapt to Loc::filename now being a function

This commit is contained in:
Martin Kinkelin 2023-08-26 15:53:01 +02:00
parent ae52da1bfa
commit 8fc096e4c6
6 changed files with 11 additions and 31 deletions

View file

@ -291,7 +291,7 @@ void DtoAssert(Module *M, const Loc &loc, DValue *msg) {
void DtoCAssert(Module *M, const Loc &loc, LLValue *msg) {
const auto &triple = *global.params.targetTriple;
const auto file =
DtoConstCString(loc.filename ? loc.filename : M->srcfile.toChars());
DtoConstCString(loc.filename() ? loc.filename() : M->srcfile.toChars());
const auto line = DtoConstUint(loc.linnum());
const auto fn = getCAssertFunction(loc, gIR->module);
@ -356,7 +356,7 @@ void DtoThrow(const Loc &loc, DValue *e) {
******************************************************************************/
LLConstant *DtoModuleFileName(Module *M, const Loc &loc) {
return DtoConstString(loc.filename ? loc.filename : M->srcfile.toChars());
return DtoConstString(loc.filename() ? loc.filename() : M->srcfile.toChars());
}
/******************************************************************************