[PATCH] D42734: [DebugInfo] Improvements to representation of enumeration types (PR36168)

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 10:15:11 PST 2018


vsapsai added a comment.

In https://reviews.llvm.org/D42734#1007215, @chill wrote:

> In https://reviews.llvm.org/D42734#1006877, @vsapsai wrote:
>
> > Hi, Momchil. I suspect this change caused
> >
> > > Assertion failed: (DTy), function constructEnumTypeDIE, file /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp, line 1436.
> >
> > on the build bot http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/ For example, see http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/8694/console
> >
> > Earlier instead of `assert(DTy);` we had
> >
> >   if (DTy) {
> >     addType(Buffer, DTy);
> >     addFlag(Buffer, dwarf::DW_AT_enum_class);
> >   }
> >   
> >
> > I don't know where the bug is but maybe it makes sense to remove assertion for now and correctly handle nullptr `DTy`? This will unblock the build bot for others and after that you can work on better fix if required.
>
>
> Hello,
>
> This is quite strange. Having the flag `DINode::FlagFixedEnum` set means the LLVM IR was generated by this
>  https://github.com/llvm-mirror/clang/blob/7b1bfe45423fcf2ac09f3b5cb7a7ef20596254ed/lib/CodeGen/CGDebugInfo.cpp#L2513
>  version of Clang (as the last parameter to `createEnumerationType` did not exist before and defaults to `false`).
>
> Perhaps the underlying type was null already in the AST?
>
> For pre-existing `.ll` files, the flag `DINode::FlagFixedEnum` should be clear, and the control shouldn't even enter that if body.


So, do you plan to fix the regression? And if yes, how much time do you need? If the fix isn't expected soon, I'll revert the change.


Repository:
  rL LLVM

https://reviews.llvm.org/D42734





More information about the llvm-commits mailing list