[llvm][DebugInfo][ObjC] Fix argument order of setter/getter to DIObjCProperty constructor (#165401)
Depends on:
* https://github.com/llvm/llvm-project/pull/165373
This caused the `DW_AT_APPLE_property_(setter|getter)` to be inverted
when compiling from LLVM IR.
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 5164cec..e7a04d9 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -6341,8 +6341,8 @@
#undef VISIT_MD_FIELDS
Result = GET_OR_DISTINCT(DIObjCProperty,
- (Context, name.Val, file.Val, line.Val, setter.Val,
- getter.Val, attributes.Val, type.Val));
+ (Context, name.Val, file.Val, line.Val, getter.Val,
+ setter.Val, attributes.Val, type.Val));
return false;
}
diff --git a/llvm/test/DebugInfo/Generic/objc-property.ll b/llvm/test/DebugInfo/Generic/objc-property.ll
index 6dd0e01..53ccfef 100644
--- a/llvm/test/DebugInfo/Generic/objc-property.ll
+++ b/llvm/test/DebugInfo/Generic/objc-property.ll
@@ -15,27 +15,24 @@
; CHECK-SAME: DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite,
; CHECK-SAME: DW_APPLE_PROPERTY_atomic, DW_APPLE_PROPERTY_unsafe_unretained
;
-; FIXME: this should have a DW_AT_APPLE_property_getter tag
; CHECK: DW_TAG_APPLE_property
; CHECK: DW_AT_APPLE_property_name ("customGetterProp")
-; CHECK: DW_AT_APPLE_property_setter ("customGetter")
+; CHECK: DW_AT_APPLE_property_getter ("customGetter")
; CHECK: DW_AT_APPLE_property_attribute
; CHECK-SAME: DW_APPLE_PROPERTY_getter, DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite,
; CHECK-SAME: DW_APPLE_PROPERTY_atomic, DW_APPLE_PROPERTY_unsafe_unretained
;
-; FIXME: this should have a DW_AT_APPLE_property_setter tag
; CHECK: DW_TAG_APPLE_property
; CHECK: DW_AT_APPLE_property_name ("customSetterProp")
-; CHECK: DW_AT_APPLE_property_getter ("customSetter:")
+; CHECK: DW_AT_APPLE_property_setter ("customSetter:")
; CHECK: DW_AT_APPLE_property_attribute
; CHECK-SAME: DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite,
; CHECK-SAME: DW_APPLE_PROPERTY_setter, DW_APPLE_PROPERTY_atomic, DW_APPLE_PROPERTY_unsafe_unretained
;
-; FIXME: the DW_AT_APPLE_property_(getter|setter) values are inverted
; CHECK: DW_TAG_APPLE_property
; CHECK: DW_AT_APPLE_property_name ("customAccessorsProp")
-; CHECK: DW_AT_APPLE_property_getter ("customSetter:")
-; CHECK: DW_AT_APPLE_property_setter ("customGetter")
+; CHECK: DW_AT_APPLE_property_getter ("customGetter")
+; CHECK: DW_AT_APPLE_property_setter ("customSetter:")
; CHECK: DW_AT_APPLE_property_attribute
; CHECK-SAME: DW_APPLE_PROPERTY_getter, DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite,
; CHECK-SAME: DW_APPLE_PROPERTY_setter, DW_APPLE_PROPERTY_atomic, DW_APPLE_PROPERTY_unsafe_unretained