forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb][dwarf] Compute fully qualified names on simplified template n…
…ames with DWARFTypePrinter (llvm#117071) This is a reland of llvm#112811. Fixed the bot breakage by running ld.lld explicitly.
- Loading branch information
Showing
14 changed files
with
309 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
lldb/test/Shell/SymbolFile/DWARF/x86/simplified-template-names.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -c -o %t1.o | ||
// RUN: ld.lld %t1.o -o %t1 | ||
// RUN: %lldb %t1 -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 -c -o %t2.o | ||
// RUN: ld.lld %t2.o -o %t2 | ||
// RUN: %lldb %t2 -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 = {} | ||
|
||
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; |
Oops, something went wrong.