mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Make IrDsymbol to be a typesafe union to reduce memory usage
This commit is contained in:
parent
5b15095c81
commit
18f33b1815
27 changed files with 465 additions and 293 deletions
|
@ -1,6 +1,6 @@
|
|||
//===-- gen/dibuilder.h - Debug information builder -------------*- C++ -*-===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
||||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||||
// file for details.
|
||||
|
@ -282,7 +282,7 @@ llvm::DIType ldc::DIBuilder::CreateCompositeType(Type *type)
|
|||
assert(sd);
|
||||
|
||||
// Use the actual type associated with the declaration, ignoring any
|
||||
// const/… wrappers.
|
||||
// const/
wrappers.
|
||||
LLType *T = DtoType(sd->type);
|
||||
IrTypeAggr *ir = sd->type->irtype->isAggr();
|
||||
assert(ir);
|
||||
|
@ -605,7 +605,7 @@ llvm::DISubprogram ldc::DIBuilder::EmitSubProgram(FuncDeclaration *fd)
|
|||
fd->loc.linnum, // FIXME: scope line
|
||||
0, // Flags
|
||||
false, // isOptimized
|
||||
fd->ir.irFunc->func
|
||||
getIrFunc(fd)->func
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -657,7 +657,7 @@ void ldc::DIBuilder::EmitFuncStart(FuncDeclaration *fd)
|
|||
Logger::println("D to dwarf funcstart");
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(static_cast<llvm::MDNode *>(fd->ir.irFunc->diSubprogram) != 0);
|
||||
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
||||
EmitStopPoint(fd->loc.linnum);
|
||||
}
|
||||
|
||||
|
@ -669,7 +669,7 @@ void ldc::DIBuilder::EmitFuncEnd(FuncDeclaration *fd)
|
|||
Logger::println("D to dwarf funcend");
|
||||
LOG_SCOPE;
|
||||
|
||||
assert(static_cast<llvm::MDNode *>(fd->ir.irFunc->diSubprogram) != 0);
|
||||
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
||||
}
|
||||
|
||||
void ldc::DIBuilder::EmitBlockStart(Loc& loc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue