Skip to content
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

[NFC] [test] assert padding in memtag-globals test #128259

Merged

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Feb 22, 2025

No description provided.

Created using spr 1.3.4
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 22, 2025
@fmayer fmayer requested a review from pcc February 22, 2025 01:05
@llvmbot
Copy link
Member

llvmbot commented Feb 22, 2025

@llvm/pr-subscribers-clang

Author: Florian Mayer (fmayer)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/128259.diff

1 Files Affected:

  • (modified) clang/test/CodeGen/memtag-globals-asm.cpp (+10)
diff --git a/clang/test/CodeGen/memtag-globals-asm.cpp b/clang/test/CodeGen/memtag-globals-asm.cpp
index 186045f8f2fb5..254624ec0b7bb 100644
--- a/clang/test/CodeGen/memtag-globals-asm.cpp
+++ b/clang/test/CodeGen/memtag-globals-asm.cpp
@@ -51,6 +51,7 @@
 // CHECK-A: .memtag global_int
 // CHECK-A: .globl global_int
 // CHECK-A: .p2align 4, 0x0
+// CHECK-A: .zero 16
 // CHECK-A: .size global_int, 16
 int global_int;
 // CHECK-B: .memtag _ZL9local_int
@@ -66,6 +67,7 @@ static char local_buffer[16];
 // CHECK-D: .p2align 4, 0x0
 // CHECK-D: _ZL22local_buffer_local_end:
 // CHECK-D: .xword _ZL12local_buffer+16
+// CHECK-D: .zero 8
 // CHECK-D: .size _ZL22local_buffer_local_end, 16
 static char* local_buffer_local_end = &local_buffer[16];
 // CHECK-E: .memtag local_buffer_global_end
@@ -73,6 +75,7 @@ static char* local_buffer_local_end = &local_buffer[16];
 // CHECK-E  .p2align 4, 0x0
 // CHECK-E: local_buffer_global_end:
 // CHECK-E: .xword _ZL12local_buffer+16
+// CHECK-E: .zero 8
 // CHECK-E: .size local_buffer_global_end, 16
 char* local_buffer_global_end = &local_buffer[16];
 
@@ -85,6 +88,7 @@ char global_buffer[16];
 // CHECK-G: .p2align 4, 0x0
 // CHECK-G: _ZL23global_buffer_local_end:
 // CHECK-G: .xword global_buffer+16
+// CHECK-G: .zero 8
 // CHECK-G: .size _ZL23global_buffer_local_end, 16
 static char* global_buffer_local_end = &global_buffer[16];
 // CHECK-H: .memtag global_buffer_global_end
@@ -104,6 +108,7 @@ class MyClass {
 // CHECK-I: .memtag _ZN7MyClass12my_class_intE
 // CHECK-I: .globl _ZN7MyClass12my_class_intE
 // CHECK-I: .p2align 4, 0x0
+// CHECK-I: .zero 16
 // CHECK-I: .size _ZN7MyClass12my_class_intE, 16
 int MyClass::my_class_int;
 // CHECK-NOT: .memtag _ZN7MyClass18my_class_const_intE
@@ -112,10 +117,12 @@ const int MyClass::my_class_const_int = 1;
 // CHECK-J: .memtag global_my_class
 // CHECK-J: .globl global_my_class
 // CHECK-J: .p2align 4, 0x0
+// CHECK-J: .zero 8
 // CHECK-J: .size global_my_class, 16
 MyClass global_my_class;
 // CHECK-K: .memtag _ZL14local_my_class
 // CHECK-K: .p2align 4, 0x0
+// CHECK-K: .zero 8
 // CHECK-K: .size _ZL14local_my_class, 16
 static MyClass local_my_class;
 
@@ -123,12 +130,14 @@ static MyClass local_my_class;
 static const char local_const_string[] = "this is a local string";
 // CHECK-L: .memtag _ZL12local_string
 // CHECK-L: .p2align 4, 0x0
+// CHECK-L: .zero 9
 // CHECK-L: .size _ZL12local_string, 32
 static char local_string[] = "this is a local string";
 
 // CHECK-M: .memtag global_atomic_int
 // CHECK-M: .globl global_atomic_int
 // CHECK-M: .p2align 4, 0x0
+// CHECK-M: .zero 16
 // CHECK-M: .size global_atomic_int, 16
 _Atomic(int) global_atomic_int;
 // CHECK-N: .memtag _ZL16local_atomic_int
@@ -144,6 +153,7 @@ union MyUnion {
 // CHECK-O: .memtag global_union
 // CHECK-O: .globl global_union
 // CHECK-O: .p2align 4, 0x0
+// CHECK-O: .zero 16
 // CHECK-O: .size global_union, 16
 MyUnion global_union;
 // CHECK-P: .memtag _ZL11local_union

Created using spr 1.3.4
@fmayer fmayer merged commit 63af271 into main Feb 24, 2025
11 checks passed
@fmayer fmayer deleted the users/fmayer/spr/nfc-test-assert-padding-in-memtag-globals-test branch February 24, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants