[llvm-dev] Question about 'isUnsignedDIType' function on DwarfUnit.cpp

jingu kang via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 31 16:02:26 PDT 2016


Hi All,

I have question about 'isUnsignedDIType' function on
'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp'

When we want to generate object file with dwarf debug format, clang
can generates 'DW_ATE_lo_user' encoding for complex integer type as
follow:

"clang/lib/CodeGen/CGDebugInfo.cpp"
llvm::DIType *CGDebugInfo::CreateType(const ComplexType *Ty) {
...
  if (Ty->isComplexIntegerType())
    Encoding = llvm::dwarf::DW_ATE_lo_user;
...

There is a assert for DIBasicType's enconding in the
'isUnsignedDIType' function and it generates assertion for
'DW_ATE_lo_user'. Is it intended? I think it should not generate
assertion for 'DW_ATE_lo_user' because it comes from  complex integer
type. How do you think about it? If I missed something, please let me
know.

Thanks,
JinGu Kang


More information about the llvm-dev mailing list