Expression evaluation for overloaded C functions (redux)
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 don't try and resolve the same invalid candidate multiple times.
Differential Revision: https://reviews.llvm.org/D27223
Subscribers: lldb-commits
llvm-svn: 290117
diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
index af60957..be5cbae 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
@@ -12,6 +12,7 @@
// C Includes
// C++ Includes
+#include <set>
#include <vector>
// Other libraries and framework includes
@@ -93,7 +94,6 @@
}
std::unique_ptr<TypeScavenger> GetTypeScavenger() override;
-
lldb::TypeCategoryImplSP GetFormatters() override;
HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries() override;
@@ -142,6 +142,12 @@
static uint32_t FindEquivalentNames(ConstString type_name,
std::vector<ConstString> &equivalents);
+ // Given a mangled function name, calculates some alternative manglings since
+ // the compiler mangling may not line up with the symbol we are expecting
+ static uint32_t
+ FindAlternateFunctionManglings(const ConstString mangled,
+ std::set<ConstString> &candidates);
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------