[Lldb-commits] [PATCH] D44613: Support template template parameters

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 19 12:31:15 PDT 2018


friss added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2043
+    is_template_template_argument = true;
+    [[clang::fallthrough]];
   case DW_TAG_template_type_parameter:
----------------
clayborg wrote:
> Shouldn't we be using a #define so this works on any compiler?
You're right. I had looked in clang to see if it was used like this, but I think the many instances I saw were in the test directory. 


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2093
+      if (!is_template_template_argument) {
+        assert(clang_type && "AST context could not provide void type.");
         bool is_signed = false;
----------------
clayborg wrote:
> Do we really want to kill the program here? lldbassert would be better IMHO. Templates are one of the most contentious areas of the DWARF from compiler to compiler and I would rather we not crash when we can't successfully dig out a type from DWO/DWZ/type units/-gmodules etc...
Well, the lines above are       
> if (!clang_type)
>         clang_type = m_ast.GetBasicType(eBasicTypeVoid);

I could add a test and a return false like it was before, but it seems pretty silly to expect anything when you can't even figure out the builtin void type


https://reviews.llvm.org/D44613





More information about the lldb-commits mailing list