-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[Demangling] Refactor Demangler range tracking #140762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ struct DemangledNameInfo { | |
/// \endcode | ||
std::pair<size_t, size_t> ScopeRange; | ||
|
||
/// Indicates the [start, end) of the function argument lits. | ||
/// Indicates the [start, end) of the function argument list. | ||
/// E.g., | ||
/// \code{.cpp} | ||
/// int (*getFunc<float>(float, double))(int, int) | ||
|
@@ -59,10 +59,24 @@ struct DemangledNameInfo { | |
/// \endcode | ||
std::pair<size_t, size_t> QualifiersRange; | ||
|
||
/// Indicates the [start, end) of the function's prefix. This is a | ||
/// catch-all range for anything that is not tracked by the rest of | ||
/// the pairs. | ||
std::pair<size_t, size_t> PrefixRange; | ||
|
||
/// Indicates the [start, end) of the function's suffix. This is a | ||
/// catch-all range for anything that is not tracked by the rest of | ||
/// the pairs. | ||
std::pair<size_t, size_t> SuffixRange; | ||
|
||
/// Returns \c true if this object holds a valid basename range. | ||
bool hasBasename() const { | ||
return BasenameRange.second > BasenameRange.first && | ||
BasenameRange.second > 0; | ||
return BasenameRange.second > BasenameRange.first; | ||
} | ||
|
||
/// Returns \c true if this object holds a valid arguments range. | ||
bool hasArguments() const { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unused? |
||
return ArgumentsRange.second > ArgumentsRange.first; | ||
} | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ struct Entry { | |
FunctionNameWithArgs, | ||
FunctionNameNoArgs, | ||
FunctionMangledName, | ||
FunctionPrefix, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we add a new variable here we will need to update the documentation under |
||
FunctionScope, | ||
FunctionBasename, | ||
FunctionTemplateArguments, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ add_lldb_unittest(LLDBCoreTests | |
DumpDataExtractorTest.cpp | ||
DumpRegisterInfoTest.cpp | ||
FormatEntityTest.cpp | ||
MangledTest.cpp | ||
ItaniumMangledTest.cpp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't mind renaming the file but there are already swift mangling tests in this file, so |
||
ModuleSpecTest.cpp | ||
PluginManagerTest.cpp | ||
ProgressReportTest.cpp | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate why this was needed?