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

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 31 22:33:54 PDT 2016


+llvm-dev which got lost somehow 

> -----Original Message-----
> From: Robinson, Paul
> Sent: Thursday, March 31, 2016 10:33 PM
> To: 'jingu kang'
> Subject: RE: [llvm-dev] Question about 'isUnsignedDIType' function on
> DwarfUnit.cpp
> 
> 
> 
> > -----Original Message-----
> > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of
> jingu
> > kang via llvm-dev
> > Sent: Thursday, March 31, 2016 4:02 PM
> > To: llvm-dev
> > Subject: [llvm-dev] Question about 'isUnsignedDIType' function on
> > DwarfUnit.cpp
> >
> > 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.
> 
> I tried compiling the following with -g:
>   _Complex int foo;
> I do not see an assertion, I see it producing a DW_TAG_base_type
> with name "complex" and an encoding of 0x80 (decimal 128).
> Do you have a sample source file and command line to reproduce the
> assertion?  Are you using an older compiler?
> --paulr
> 
> >
> > Thanks,
> > JinGu Kang
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list