[PATCH] D43304: [DebugInfo] Accept enumeration types without underlying inetger type present in debug info metadata
Momchil Velikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 10:58:06 PST 2018
chill created this revision.
chill added reviewers: aprantl, dblaikie, vsapsai.
Herald added subscribers: JDevlieghere, mehdi_amini.
chill added a comment.
I'll add a test tomorrow.
Workaround for not yet explained buildbot issue.
http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/8694/console
Repository:
rL LLVM
https://reviews.llvm.org/D43304
Files:
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Index: lib/CodeGen/AsmPrinter/DwarfUnit.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1430,11 +1430,11 @@
void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
const DIType *DTy = resolve(CTy->getBaseType());
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)
+ addType(Buffer, DTy);
+ if (DD->getDwarfVersion() >= 4 && (CTy->getFlags() & DINode::FlagFixedEnum))
+ addFlag(Buffer, dwarf::DW_AT_enum_class);
}
DINodeArray Elements = CTy->getElements();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43304.134267.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180214/be972902/attachment.bin>
More information about the llvm-commits
mailing list