[PATCH] D70537: [clang] CGDebugInfo asserts `!DT.isNull()` when compiling with debug symbols

kamlesh kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 05:59:24 PST 2019


kamleshbhalui created this revision.
kamleshbhalui added reviewers: rsmith, dblaikie, vsk.
kamleshbhalui added a project: debug-info.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fixes this assert failure. 
Which occured due to deduction of auto type of  templated variables (required by debuginfo) resulted into null.
https://bugs.llvm.org/show_bug.cgi?id=42710


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70537

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp


Index: clang/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- clang/lib/CodeGen/CGDebugInfo.cpp
+++ clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1434,6 +1434,8 @@
         if (isa<VarTemplatePartialSpecializationDecl>(V))
           continue;
 
+        if (isa<VarTemplateSpecializationDecl>(V))
+	  continue;
         // Reuse the existing static member declaration if one exists
         auto MI = StaticDataMemberCache.find(V->getCanonicalDecl());
         if (MI != StaticDataMemberCache.end()) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70537.230440.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191121/6f294bfe/attachment.bin>


More information about the cfe-commits mailing list