Skip to content

Commit 77f83c7

Browse files
committed
Update LLVM lib/Demangle 2dea832ef064bb86...3a4c7cc56c07b2db
New: - [ms] Two demangling fixes for non-type template parameters - [itanium] Demangling for built-in type transformations - [itanium] Demangling rules for C++20 concepts and requires-expressions - [itanium] Demangle explicitly named object parameters (...and some minor tweaks.) Ran: cp ~/src/llvm-project/llvm/include/llvm/Demangle/*.{h,def} third_party/llvm/include/llvm/Demangle/ cp ~/src/llvm-project/llvm/lib/Demangle/*.cpp third_party/llvm/lib/Demangle/ cp ~/src/llvm-project/llvm/LICENSE.TXT third_party/llvm/LICENSE.txt
1 parent 18534b7 commit 77f83c7

File tree

9 files changed

+634
-137
lines changed

9 files changed

+634
-137
lines changed

third_party/llvm/include/llvm/Demangle/Demangle.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ enum : int {
3232
/// Returns a non-NULL pointer to a NUL-terminated C style string
3333
/// that should be explicitly freed, if successful. Otherwise, may return
3434
/// nullptr if mangled_name is not a valid mangling or is nullptr.
35-
char *itaniumDemangle(std::string_view mangled_name);
35+
char *itaniumDemangle(std::string_view mangled_name, bool ParseParams = true);
3636

3737
enum MSDemangleFlags {
3838
MSDF_None = 0,
@@ -67,7 +67,9 @@ char *dlangDemangle(std::string_view MangledName);
6767
/// demangling occurred.
6868
std::string demangle(std::string_view MangledName);
6969

70-
bool nonMicrosoftDemangle(std::string_view MangledName, std::string &Result);
70+
bool nonMicrosoftDemangle(std::string_view MangledName, std::string &Result,
71+
bool CanHaveLeadingDot = true,
72+
bool ParseParams = true);
7173

7274
/// "Partial" demangler. This supports demangling a string into an AST
7375
/// (typically an intermediate stage in itaniumDemangle) and querying certain
@@ -102,7 +104,7 @@ struct ItaniumPartialDemangler {
102104
char *getFunctionParameters(char *Buf, size_t *N) const;
103105
char *getFunctionReturnType(char *Buf, size_t *N) const;
104106

105-
/// If this function has any any cv or reference qualifiers. These imply that
107+
/// If this function has any cv or reference qualifiers. These imply that
106108
/// the function is a non-static member function.
107109
bool hasFunctionQualifiers() const;
108110

third_party/llvm/include/llvm/Demangle/DemangleConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
#define DEMANGLE_FALLTHROUGH
8787
#endif
8888

89+
#ifndef DEMANGLE_ASSERT
90+
#include <cassert>
91+
#define DEMANGLE_ASSERT(__expr, __msg) assert((__expr) && (__msg))
92+
#endif
93+
8994
#define DEMANGLE_NAMESPACE_BEGIN namespace llvm { namespace itanium_demangle {
9095
#define DEMANGLE_NAMESPACE_END } }
9196

0 commit comments

Comments
 (0)