diff options
| author | Michael Buch <michaelbuch12@gmail.com> | 2025-10-29 09:43:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-29 09:43:12 +0000 |
| commit | dda95d90c91cf8c20b00778ee1366d0a9754d704 (patch) | |
| tree | 12e6f89c28a25662191c25f71272e1ccdff1247d | |
| parent | 7f1aef8dbe50df9abfc0bd0beb646ab52755555e (diff) | |
| download | llvm-dda95d90c91cf8c20b00778ee1366d0a9754d704.zip llvm-dda95d90c91cf8c20b00778ee1366d0a9754d704.tar.gz llvm-dda95d90c91cf8c20b00778ee1366d0a9754d704.tar.bz2 | |
[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.
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 4 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/Generic/objc-property.ll | 11 |
2 files changed, 6 insertions, 9 deletions
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 @@ bool LLParser::parseDIObjCProperty(MDNode *&Result, bool IsDistinct) { #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 |
