[PATCH] D43304: [DebugInfo] Accept enumeration types without underlying inetger type present in debug info metadata

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 11:07:07 PST 2018


rogfer01 added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1433
   bool IsUnsigned = DTy && isUnsignedDIType(DD, DTy);
-  if (DTy && DD->getDwarfVersion() >= 3)
-    addType(Buffer, DTy);
-  if (DD->getDwarfVersion() >= 4 && (CTy->getFlags() & DINode::FlagFixedEnum)) {
-    assert(DTy);
-    addFlag(Buffer, dwarf::DW_AT_enum_class);
+  if (DTy != nullptr) {
+    if (DD->getDwarfVersion() >= 3)
----------------
I think `if (DTy)` suits more the existing coding standard elsewhere in this file.


Repository:
  rL LLVM

https://reviews.llvm.org/D43304





More information about the llvm-commits mailing list