[Lldb-commits] [PATCH] D59537: Instantiate 'std' templates explicitly in the expression evaluator

Balázs Kéri via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 22 02:45:38 PDT 2019


balazske added inline comments.


================
Comment at: lldb/source/Symbol/StdModuleHandler.cpp:220
+    case TemplateArgument::Type: {
+      QualType our_type = m_importer.Import(arg.getAsType());
+      imported_args.push_back(TemplateArgument(our_type));
----------------
teemperor wrote:
> balazske wrote:
> > For long-term (but it should be not so long) the `ASTImporter::Import_New` should be used (later the Import_New will become the Import). By using the existing Import_New the code will be prepared for this change. For this to work the error handling (ignore error, return it from Import or something else) must be implemented here.
> Thanks, fixed! I currently just return nothing, which will bring us back to LLDB's normal importing logic (which then maybe does better).
The `TemplateArgument::Integral` case is not fixed yet.


================
Comment at: lldb/source/Symbol/StdModuleHandler.cpp:212
+      if (!type)
+        return {};
+      imported_args.push_back(TemplateArgument(*type));
----------------
This does not work correctly: `llvm::consumeError(type.takeError())` should be called to handle the error, otherwise it will trigger assertion.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59537/new/

https://reviews.llvm.org/D59537





More information about the lldb-commits mailing list