-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter #112811
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
[lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter #112811
Changes from all commits
3fc0675
38a459b
769c4fb
58605dc
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Test lldb is able to compute the fully qualified names on templates with | ||
// -gsimple-template-names and -fdebug-types-section. | ||
|
||
// REQUIRES: lld | ||
|
||
// Test against logging to see if we print the fully qualified names correctly. | ||
// RUN: %clangxx --target=x86_64-pc-linux -g -gsimple-template-names %s -o %t | ||
// RUN: %lldb %t -o "log enable dwarf comp" -o "target variable v3" -o exit | FileCheck %s --check-prefix=LOG | ||
|
||
// Test that we following DW_AT_signature correctly. If not, lldb might confuse the types of v1 and v2. | ||
// RUN: %clangxx --target=x86_64-pc-linux -g -gsimple-template-names -fdebug-types-section %s -o %t | ||
// RUN: %lldb %t -o "target variable v1 v2" -o exit | FileCheck %s --check-prefix=TYPE | ||
|
||
// LOG: unique name: t3<t2<int> >::t4 | ||
|
||
// TYPE: (t2<outer_struct1::t1<int> >) v1 = {} | ||
// TYPE-NEXT: (t2<outer_struct2::t1<int> >) v2 = {} | ||
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. Do we need to check the typename that gets displayed here? Is that actually affected by this patch? 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. No, they are not affected by this patch. When I working on this change, I had an oversight on not calling |
||
|
||
struct outer_struct1 { | ||
template <typename> struct t1 {}; | ||
}; | ||
|
||
struct outer_struct2 { | ||
template <typename> struct t1 {}; | ||
}; | ||
|
||
template <typename> struct t2 {}; | ||
t2<outer_struct1::t1<int>> v1; | ||
t2<outer_struct2::t1<int>> v2; | ||
|
||
template <typename> struct t3 { | ||
struct t4 {}; | ||
}; | ||
t3<t2<int>>::t4 v3; | ||
|
||
int main() {} |
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.
Nice