Adapt to free functions in dmd C++ namespace now

This commit is contained in:
Martin Kinkelin 2024-03-03 19:14:00 +01:00
parent 217888ff47
commit 9041c0bf67
37 changed files with 132 additions and 64 deletions

View file

@ -23,6 +23,8 @@
#include "ir/irtypeaggr.h"
#include "llvm/Analysis/ValueTracking.h"
using namespace dmd;
namespace {
unsigned getVthisIdx(AggregateDeclaration *ad) {
return getFieldGEPIndex(ad, ad->vthis);
@ -437,7 +439,7 @@ static void DtoCreateNestedContextType(FuncDeclaration *fd) {
LLType *t = nullptr;
unsigned alignment = 0;
if (captureByRef(vd)) {
t = DtoType(vd->type->pointerTo());
t = DtoType(pointerTo(vd->type));
alignment = target.ptrsize;
} else if (isParam && (vd->storage_class & STClazy)) {
// the type is a delegate (LL struct)