[clang] cc868f6 - [clang][DebugInfo][test] Convert Objective-C property test to check LLVM IR (#165286)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 27 12:06:47 PDT 2025
Author: Michael Buch
Date: 2025-10-27T19:06:43Z
New Revision: cc868f6545592cded1521f84034df238c96a187c
URL: https://github.com/llvm/llvm-project/commit/cc868f6545592cded1521f84034df238c96a187c
DIFF: https://github.com/llvm/llvm-project/commit/cc868f6545592cded1521f84034df238c96a187c.diff
LOG: [clang][DebugInfo][test] Convert Objective-C property test to check LLVM IR (#165286)
There's a couple of tests like this.
This patch series renames these to something more descriptive and
adjusts the tests to check IR. Currently the tests check raw assembly
output (not even dwarfdump). Which most likely hid some bugs around
property debug-info.
Added:
clang/test/DebugInfo/ObjC/property-basic.m
Modified:
Removed:
clang/test/DebugInfo/ObjC/property.m
################################################################################
diff --git a/clang/test/DebugInfo/ObjC/property-basic.m b/clang/test/DebugInfo/ObjC/property-basic.m
new file mode 100644
index 0000000000000..65e1d7a6a9b1f
--- /dev/null
+++ b/clang/test/DebugInfo/ObjC/property-basic.m
@@ -0,0 +1,20 @@
+// Checks basic debug-info generation for property. Makes sure we
+// create a DIObjCProperty for the synthesized property.
+
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
+
+// CHECK: !DIObjCProperty(name: "p1"
+// CHECK-SAME: attributes: 2316
+// CHECK-SAME: type: ![[P1_TYPE:[0-9]+]]
+//
+// CHECK: ![[P1_TYPE]] = !DIBasicType(name: "int"
+
+ at interface I1 {
+int p1;
+}
+ at property int p1;
+ at end
+
+ at implementation I1
+ at synthesize p1;
+ at end
diff --git a/clang/test/DebugInfo/ObjC/property.m b/clang/test/DebugInfo/ObjC/property.m
deleted file mode 100644
index ca013b24be421..0000000000000
--- a/clang/test/DebugInfo/ObjC/property.m
+++ /dev/null
@@ -1,15 +0,0 @@
-// FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -S -debug-info-kind=limited %s -o - | FileCheck %s
-
-// CHECK: AT_APPLE_property_name
-// CHECK: AT_APPLE_property_attribute
-// CHECK: AT_APPLE_property
- at interface I1 {
-int p1;
-}
- at property int p1;
- at end
-
- at implementation I1
- at synthesize p1;
- at end
More information about the cfe-commits
mailing list