mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Merge pull request #1813 from rainers/cv11
DI: display typeof(null) as void*
This commit is contained in:
commit
ba180bbde2
2 changed files with 31 additions and 29 deletions
|
@ -658,15 +658,15 @@ ldc::DIType ldc::DIBuilder::CreateTypeDescription(Type *type, bool derefclass) {
|
|||
t = type->toBasetype();
|
||||
}
|
||||
|
||||
#if LDC_LLVM_VER >= 309
|
||||
if (t->ty == Tnull)
|
||||
return DBuilder.createNullPtrType();
|
||||
if (t->ty == Tvoid)
|
||||
return nullptr;
|
||||
#if LDC_LLVM_VER >= 309
|
||||
return nullptr;
|
||||
#else
|
||||
if (t->ty == Tvoid || t->ty == Tnull)
|
||||
return DBuilder.createUnspecifiedType(t->toChars());
|
||||
#endif
|
||||
if (t->ty == Tnull) // display null as void*
|
||||
return DBuilder.createPointerType(CreateTypeDescription(Type::tvoid, false),
|
||||
8, 8, "typeof(null)");
|
||||
if (t->ty == Tvector)
|
||||
return CreateVectorType(type);
|
||||
if (t->isintegral() || t->isfloating()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue