[Lldb-commits] [PATCH] D27223: Expression evaluation for overloaded C functions (redux)

Luke Drummond via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 29 12:16:36 PST 2016


ldrumm created this revision.
ldrumm added reviewers: spyffe, clayborg.
ldrumm added a subscriber: LLDB.
Herald added a subscriber: aemerson.

This is a redux of Ewan's patch <https://reviews.llvm.org/D17957> , refactored to properly substitute primitive  types using a hook in the itanium demangler, and updated after the previous patch went stale

The new `SubsPrimitiveParmItanium` function takes a symbol name and replacement primitive type parameter as before but parses it using the FastDemangler, which has been modified to be able to notify clients of parse events (primitive types at this point).

Additionally, we now use a `set` of `ConstStrings` instead of a `vector` so that we try and resolve the same invalid candidate multiple times.

I'd particularly welcome feedback on whether there is a better way of doing the hook from the demangler. In the present implementation, the time tradeoff is a single `nullptr` check in the hot path, which was the least invasive change of a few I prototyped.


https://reviews.llvm.org/D27223

Files:
  include/lldb/Core/FastDemangle.h
  packages/Python/lldbsuite/test/expression_command/call-overloaded-c-fuction/Makefile
  packages/Python/lldbsuite/test/expression_command/call-overloaded-c-fuction/TestCallOverloadedCFunction.py
  packages/Python/lldbsuite/test/expression_command/call-overloaded-c-fuction/main.c
  source/Core/FastDemangle.cpp
  source/Expression/IRExecutionUnit.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
  source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27223.79616.patch
Type: text/x-patch
Size: 15694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161129/b4709077/attachment-0001.bin>


More information about the lldb-commits mailing list