Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LLVM project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Panda
LLVM project
Commits
2004d3ba
Commit
2004d3ba
authored
9 years ago
by
Adrian Prantl
Browse files
Options
Downloads
Patches
Plain Diff
Add original source code to test case as suggested in review.
llvm-svn: 240863
parent
77731b49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
+58
-0
58 additions, 0 deletions
llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
with
58 additions
and
0 deletions
llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
+
58
−
0
View file @
2004d3ba
...
...
@@ -7,6 +7,19 @@ target triple = "x86_64-apple-darwin"
; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s
; REQUIRES: object-emission
; // ---------------------------------------------------------------------
; // Not packed.
; // ---------------------------------------------------------------------
; struct size8 {
; int i : 4;
; long long l : 60;
; };
; struct layout0 {
; char l0_ofs0;
; struct size8 l0_ofs8;
; int l0_ofs16 : 1;
; } l0;
%struct.layout0
=
type
{
i8
,
%struct.size8
,
i8
}
%struct.size8
=
type
{
i64
}
; CHECK: DW_TAG_structure_type
...
...
@@ -24,6 +37,20 @@ target triple = "x86_64-apple-darwin"
; CHECK: DW_AT_bit_offset {{.*}} (0x1f)
; CHECK: DW_AT_data_member_location {{.*}}10
; // ---------------------------------------------------------------------
; // Implicitly packed.
; // ---------------------------------------------------------------------
; struct size8_anon {
; int : 4;
; long long : 60;
; };
; struct layout1 {
; char l1_ofs0;
; struct size8_anon l1_ofs1;
; int l1_ofs9 : 1;
; } l1;
%struct.layout1
=
type
<{
i8
,
%struct.size8_anon
,
i8
,
[
2
x
i8
]
}>
%struct.size8_anon
=
type
{
i64
}
...
...
@@ -43,6 +70,21 @@ target triple = "x86_64-apple-darwin"
; CHECK: DW_AT_bit_offset {{.*}} (0x17)
; CHECK: DW_AT_data_member_location {{.*}}08
; // ---------------------------------------------------------------------
; // Explicitly packed.
; // ---------------------------------------------------------------------
; #pragma pack(1)
; struct size8_pack1 {
; int i : 4;
; long long l : 60;
; };
; struct layout2 {
; char l2_ofs0;
; struct size8_pack1 l2_ofs1;
; int l2_ofs9 : 1;
; } l2;
; #pragma pack()
%struct.layout2
=
type
<{
i8
,
%struct.size8_pack1
,
i8
}>
%struct.size8_pack1
=
type
{
i64
}
...
...
@@ -62,6 +104,22 @@ target triple = "x86_64-apple-darwin"
; CHECK: DW_AT_bit_offset {{.*}} (0x17)
; CHECK: DW_AT_data_member_location {{.*}}08
; // ---------------------------------------------------------------------
; // Explicitly packed with different alignment.
; // ---------------------------------------------------------------------
; #pragma pack(4)
; struct size8_pack4 {
; int i : 4;
; long long l : 60;
; };
; struct layout3 {
; char l3_ofs0;
; struct size8_pack4 l3_ofs4;
; int l3_ofs12 : 1;
; } l 3;
; #pragma pack()
%struct.layout3
=
type
<{
i8
,
[
3
x
i8
],
%struct.size8_pack4
,
i8
,
[
3
x
i8
]
}>
%struct.size8_pack4
=
type
{
i64
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment