[Lldb-commits] [PATCH] D65932: [lldb] Fix dynamic_cast by not treating type info pointers as variables.

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 8 02:32:53 PDT 2019


teemperor created this revision.
teemperor added a reviewer: davide.
Herald added subscribers: lldb-commits, abidh.
Herald added a project: LLDB.

Our IR rewriting infrastructure currently treats type info pointers ('@_ZTI...') as variables it needs to rewrite. This isn't
necessary as we don't need to have the type info (and often shouldn't) in the same module as our expression. This
patch filters out these errors when resolving variables by checking if they are for type information. Note that we
only do the demangling and checking work in cases where we threw an error before, so this doesn't have any
performance impact on other expressions.

This patch should fix dynamic_cast and also adds a bunch of test coverage to that language feature.

Fixes rdar://10813639


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D65932

Files:
  lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/ExtBase.cpp
  lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/ExtBase.h
  lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/TestDynamicCast.py
  lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/main.cpp
  lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65932.214089.patch
Type: text/x-patch
Size: 4526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190808/67966ea7/attachment.bin>


More information about the lldb-commits mailing list