forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I0101418ab9aed384628b887f4ea983599eda06c8
- Loading branch information
Showing
208 changed files
with
3,263 additions
and
3,488 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
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
30 changes: 30 additions & 0 deletions
30
lldb/test/Shell/SymbolFile/DWARF/no_unique_address-base-alignment.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,30 @@ | ||
// XFAIL: * | ||
|
||
// RUN: %clangxx_host -gdwarf -o %t %s | ||
// RUN: %lldb %t \ | ||
// RUN: -o "expr alignof(OverlappingDerived)" \ | ||
// RUN: -o "expr sizeof(OverlappingDerived)" \ | ||
// RUN: -o exit | FileCheck %s | ||
|
||
struct Empty {}; | ||
|
||
struct OverlappingBase { | ||
[[no_unique_address]] Empty e; | ||
}; | ||
static_assert(sizeof(OverlappingBase) == 1); | ||
static_assert(alignof(OverlappingBase) == 1); | ||
|
||
struct Base { | ||
int mem; | ||
}; | ||
|
||
struct OverlappingDerived : Base, OverlappingBase {}; | ||
static_assert(alignof(OverlappingDerived) == 4); | ||
static_assert(sizeof(OverlappingDerived) == 4); | ||
|
||
// CHECK: (lldb) expr alignof(OverlappingDerived) | ||
// CHECK-NEXT: ${{.*}} = 4 | ||
// CHECK: (lldb) expr sizeof(OverlappingDerived) | ||
// CHECK-NEXT: ${{.*}} = 4 | ||
|
||
int main() { OverlappingDerived d; } |
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,43 @@ | ||
// XFAIL: * | ||
// | ||
// RUN: %clangxx_host -gdwarf -o %t %s | ||
// RUN: %lldb %t \ | ||
// RUN: -o "expr alignof(base)" \ | ||
// RUN: -o "expr alignof(packed_base)" \ | ||
// RUN: -o "expr alignof(derived)" \ | ||
// RUN: -o "expr sizeof(derived)" \ | ||
// RUN: -o exit | FileCheck %s | ||
|
||
struct __attribute__((packed)) packed { | ||
int x; | ||
char y; | ||
int z; | ||
} g_packed_struct; | ||
|
||
// LLDB incorrectly calculates alignof(base) | ||
struct foo {}; | ||
struct base : foo { int x; }; | ||
static_assert(alignof(base) == 4); | ||
|
||
// CHECK: (lldb) expr alignof(base) | ||
// CHECK-NEXT: ${{.*}} = 4 | ||
|
||
// LLDB incorrectly calculates alignof(packed_base) | ||
struct __attribute__((packed)) packed_base { int x; }; | ||
static_assert(alignof(packed_base) == 1); | ||
|
||
// CHECK: (lldb) expr alignof(packed_base) | ||
// CHECK-NEXT: ${{.*}} = 1 | ||
|
||
struct derived : packed, packed_base { | ||
short s; | ||
} g_derived; | ||
static_assert(alignof(derived) == 2); | ||
static_assert(sizeof(derived) == 16); | ||
|
||
// CHECK: (lldb) expr alignof(derived) | ||
// CHECK-NEXT: ${{.*}} = 2 | ||
// CHECK: (lldb) expr sizeof(derived) | ||
// CHECK-NEXT: ${{.*}} = 16 | ||
|
||
int main() {} |
Oops, something went wrong.