parseh: correct debug for forward decls

also C typedefs emit simply `const Foo = Bar;`
since in C you can implicitly cast from a typedef
child to parent but in zig you can't.
This commit is contained in:
Andrew Kelley
2016-01-31 17:48:19 -07:00
parent 773cd851fe
commit 41b95cc237
4 changed files with 33 additions and 5 deletions

View File

@@ -262,6 +262,17 @@ LLVMZigDIType *LLVMZigCreateReplaceableCompositeType(LLVMZigDIBuilder *dibuilder
return reinterpret_cast<LLVMZigDIType*>(di_type);
}
LLVMZigDIType *LLVMZigCreateDebugForwardDeclType(LLVMZigDIBuilder *dibuilder, unsigned tag,
const char *name, LLVMZigDIScope *scope, LLVMZigDIFile *file, unsigned line)
{
DIType *di_type = reinterpret_cast<DIBuilder*>(dibuilder)->createForwardDecl(
tag, name,
reinterpret_cast<DIScope*>(scope),
reinterpret_cast<DIFile*>(file),
line);
return reinterpret_cast<LLVMZigDIType*>(di_type);
}
void LLVMZigReplaceTemporary(LLVMZigDIBuilder *dibuilder, LLVMZigDIType *type,
LLVMZigDIType *replacement)
{