[clang] d0a7411 - [clang][DebugInfo][test] Make Objective-C property5.m test check LLVM IR
Michael Buch via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 27 12:44:25 PDT 2025
Author: Michael Buch
Date: 2025-10-27T19:44:19Z
New Revision: d0a7411cb840d253f58a627cc3957fc7b5263a3d
URL: https://github.com/llvm/llvm-project/commit/d0a7411cb840d253f58a627cc3957fc7b5263a3d
DIFF: https://github.com/llvm/llvm-project/commit/d0a7411cb840d253f58a627cc3957fc7b5263a3d.diff
LOG: [clang][DebugInfo][test] Make Objective-C property5.m test check LLVM IR
New name makes it easer to find and checking IR is less likely to hide
bugs (and is more consistent with the other Clang debug-info tests).
Added:
clang/test/DebugInfo/ObjC/property-explicit-accessors.m
Modified:
Removed:
clang/test/DebugInfo/ObjC/property5.m
################################################################################
diff --git a/clang/test/DebugInfo/ObjC/property-explicit-accessors.m b/clang/test/DebugInfo/ObjC/property-explicit-accessors.m
new file mode 100644
index 0000000000000..86eade6998afe
--- /dev/null
+++ b/clang/test/DebugInfo/ObjC/property-explicit-accessors.m
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
+
+// CHECK: !DIObjCProperty(name: "baseInt"
+// CHECK-SAME: setter: "mySetBaseInt:"
+// CHECK-SAME: getter: "myGetBaseInt"
+// CHECK-SAME: attributes: 2446
+// CHECK-SAME: type: ![[P1_TYPE:[0-9]+]]
+//
+// CHECK: ![[P1_TYPE]] = !DIBasicType(name: "int"
+
+ at interface BaseClass2
+{
+ int _baseInt;
+}
+- (int) myGetBaseInt;
+- (void) mySetBaseInt: (int) in_int;
+ at property(getter=myGetBaseInt,setter=mySetBaseInt:) int baseInt;
+ at end
+
+ at implementation BaseClass2
+
+- (int) myGetBaseInt
+{
+ return _baseInt;
+}
+
+- (void) mySetBaseInt: (int) in_int
+{
+ _baseInt = 2 * in_int;
+}
+ at end
+
+
+void foo(BaseClass2 *ptr) {}
diff --git a/clang/test/DebugInfo/ObjC/property5.m b/clang/test/DebugInfo/ObjC/property5.m
deleted file mode 100644
index 8b70f1ff20824..0000000000000
--- a/clang/test/DebugInfo/ObjC/property5.m
+++ /dev/null
@@ -1,33 +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_getter
-// CHECK: AT_APPLE_property_setter
-// CHECK: AT_APPLE_property_attribute
-// CHECK: AT_APPLE_property
-
- at interface BaseClass2
-{
- int _baseInt;
-}
-- (int) myGetBaseInt;
-- (void) mySetBaseInt: (int) in_int;
- at property(getter=myGetBaseInt,setter=mySetBaseInt:) int baseInt;
- at end
-
- at implementation BaseClass2
-
-- (int) myGetBaseInt
-{
- return _baseInt;
-}
-
-- (void) mySetBaseInt: (int) in_int
-{
- _baseInt = 2 * in_int;
-}
- at end
-
-
-void foo(BaseClass2 *ptr) {}
More information about the cfe-commits
mailing list