-
Notifications
You must be signed in to change notification settings - Fork 345
[lldb] fix cropped demangled names in Swift backtraces #11068
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: swift/release/6.2.1
Are you sure you want to change the base?
[lldb] fix cropped demangled names in Swift backtraces #11068
Conversation
…#150999) This patch adds 2 new attributes to `DemangledNameInfo`: `TemplateRange` and `NameQualifiersRange`. It also introduces the `function.name-qualifiers` entity formatter which allows tracking qualifiers between the name of a function and its arguments/template. This will be used downstream in Swift but may have applications in C++: swiftlang#11068.
…ledNameInfo (#150999) This patch adds 2 new attributes to `DemangledNameInfo`: `TemplateRange` and `NameQualifiersRange`. It also introduces the `function.name-qualifiers` entity formatter which allows tracking qualifiers between the name of a function and its arguments/template. This will be used downstream in Swift but may have applications in C++: swiftlang/llvm-project#11068.
…llvm#150999) This patch adds 2 new attributes to `DemangledNameInfo`: `TemplateRange` and `NameQualifiersRange`. It also introduces the `function.name-qualifiers` entity formatter which allows tracking qualifiers between the name of a function and its arguments/template. This will be used downstream in Swift but may have applications in C++: swiftlang#11068.
97d1880
to
fc8389e
Compare
…llvm#150999) This patch adds 2 new attributes to `DemangledNameInfo`: `TemplateRange` and `NameQualifiersRange`. It also introduces the `function.name-qualifiers` entity formatter which allows tracking qualifiers between the name of a function and its arguments/template. This will be used downstream in Swift but may have applications in C++: swiftlang#11068.
…llvm#150999) This patch adds 2 new attributes to `DemangledNameInfo`: `TemplateRange` and `NameQualifiersRange`. It also introduces the `function.name-qualifiers` entity formatter which allows tracking qualifiers between the name of a function and its arguments/template. This will be used downstream in Swift but may have applications in C++: swiftlang#11068.
Can you rebase this on |
size_t generic_end = generic_start + 1; | ||
|
||
while (generic_end < demangled_name.size() && generic_depth > 0) { | ||
if (demangled_name[generic_end] == '<') { |
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.
LLVM coding style prefers no {} in single-statements:
if (demangled_name[generic_end] == '<')
generic_depth++;
else if ...
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.
Fixed, thanks!
fc8389e
to
d61aa2f
Compare
|
||
if (!info.hasPrefix()) | ||
return llvm::createStringError( | ||
"DemangledInfo for '%s does not have a name qualifiers range.", |
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.
"DemangledInfo for '%s' does not have a name qualifiers range.",
also, is there a way to phrase this without referencing DemangledInfo
(in case users see this?)
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.
Replaced it with: "The demangled name for '%s does not have a name qualifiers range.",
and fixed the 3 other occurrences as well.
d61aa2f
to
f654f43
Compare
This PR fixes
TestSwiftAsyncHiddenFrames.py
which had been failing since #10710 was merged.This PR introduces a new entity formatting attribute:
function.name-qualifiers
. It's a catch all for any characters between the function's name and its arguments/template arguments. For instance, for the closure below,in C.run
is the name qualifier.This PR depends on: