mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 04:15:58 +03:00
Refactoring: Introduce getIrType()
As *the* way to access the IrType associated with a Type via its `ctype` field. Most importantly, it makes sure all access is redirected to the *unqualified* type's `ctype`, which allows to get rid of the 'multiple types' workaround for aggregates in DtoType(). Those were e.g. hit for `shared struct SpinLock`, where the struct's type includes the `shared` modifier...
This commit is contained in:
parent
ab2ae5e0a2
commit
3f716ff75e
15 changed files with 117 additions and 115 deletions
|
@ -761,9 +761,8 @@ DISubroutineType DIBuilder::CreateFunctionType(Type *type) {
|
|||
|
||||
// The calling convention has to be recorded to distinguish
|
||||
// extern(D) functions from extern(C++) ones.
|
||||
DtoType(t);
|
||||
assert(t->ctype);
|
||||
unsigned CC = t->ctype->getIrFuncTy().reverseParams ? DW_CC_D_dmd : 0;
|
||||
unsigned CC =
|
||||
getIrType(t, true)->getIrFuncTy().reverseParams ? DW_CC_D_dmd : 0;
|
||||
|
||||
return DBuilder.createSubroutineType(paramsArray, DIFlags::FlagZero, CC);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue