[adapt to new free-standing functions]

This commit is contained in:
Martin Kinkelin 2025-03-13 04:36:07 +01:00
parent 811e853253
commit a57715ae5c
7 changed files with 7 additions and 7 deletions

View file

@ -624,7 +624,7 @@ DSliceValue *DtoNewDynArray(const Loc &loc, Type *arrayType, DValue *dim,
return DtoNullValue(arrayType, loc)->isSlice();
// get runtime function
bool zeroInit = eltType->isZeroInit();
bool zeroInit = isZeroInit(eltType);
const char *fnname = defaultInit
? (zeroInit ? "_d_newarrayT" : "_d_newarrayiT")
: "_d_newarrayU";

View file

@ -382,7 +382,7 @@ public:
//////////////////////////////////////////////////////////////////////////
void visit(AttribDeclaration *decl) override {
Dsymbols *d = decl->include(nullptr);
Dsymbols *d = include(decl, nullptr);
if (d) {
for (auto s : *d) {

View file

@ -509,7 +509,7 @@ void DIBuilder::AddStaticMembers(AggregateDeclaration *ad, DIFile file,
std::function<void(Dsymbols *)> visitMembers = [&](Dsymbols *members) {
for (auto s : *members) {
if (auto attrib = s->isAttribDeclaration()) {
if (Dsymbols *d = attrib->include(nullptr))
if (Dsymbols *d = include(attrib, nullptr))
visitMembers(d);
} else if (auto tmixin = s->isTemplateMixin()) {
// FIXME: static variables inside a template mixin need to be put inside

View file

@ -975,7 +975,7 @@ DValue *DtoDeclarationExp(Dsymbol *declaration) {
} else if (AttribDeclaration *a = declaration->isAttribDeclaration()) {
Logger::println("AttribDeclaration");
// choose the right set in case this is a conditional declaration
if (auto d = a->include(nullptr)) {
if (auto d = include(a, nullptr)) {
for (unsigned i = 0; i < d->length; ++i) {
DtoDeclarationExp((*d)[i]);
}

View file

@ -148,7 +148,7 @@ public:
// void[] init
// the array is null if the default initializer is zero
if (!sd->members || decl->tinfo->isZeroInit(decl->loc)) {
if (!sd->members || isZeroInit(decl->tinfo, decl->loc)) {
b.push_null_void_array();
}
// otherwise emit a void[] with the default initializer

View file

@ -240,7 +240,7 @@ LLConstant *IrClass::getVtblInit() {
c = DtoCallee(fd);
if (cd->isFuncHidden(fd) && !fd->isFuture()) {
if (isFuncHidden(cd, fd) && !fd->isFuture()) {
// fd is hidden from the view of this class. If fd overlaps with any
// function in the vtbl[], issue error.
for (size_t j = cd->vtblOffset(); j < n; j++) {

View file

@ -134,7 +134,7 @@ LLConstant *IrStruct::getTypeInfoInit() {
b.push_null_void_array();
} else {
llvm::Constant *initPtr;
if (ts->isZeroInit(Loc())) {
if (isZeroInit(ts)) {
initPtr = getNullPtr();
} else {
initPtr = getInitSymbol();