[PATCH] D47314: Stop swapping operands of DIObjCProperty (PR37120)
Bob Pan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 04:04:36 PDT 2018
pxb1988 created this revision.
Herald added a subscriber: llvm-commits.
The getterName and setterName operands of DIObjCProperty were swapped
during serialization/deserialization. after apply the patch,
Getter is always before Setter
Repository:
rL LLVM
https://reviews.llvm.org/D47314
Files:
lib/AsmParser/LLParser.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
test/Assembler/diobjcproperty.ll
Index: test/Assembler/diobjcproperty.ll
===================================================================
--- test/Assembler/diobjcproperty.ll
+++ test/Assembler/diobjcproperty.ll
@@ -1,5 +1,6 @@
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
+; RUN: opt -S < %s | FileCheck %s
; CHECK: !named = !{!0, !1, !2, !3, !4, !4}
!named = !{!0, !1, !2, !3, !4, !5}
Index: lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- lib/Bitcode/Writer/BitcodeWriter.cpp
+++ lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1830,8 +1830,8 @@
Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
Record.push_back(N->getLine());
- Record.push_back(VE.getMetadataOrNullID(N->getRawSetterName()));
Record.push_back(VE.getMetadataOrNullID(N->getRawGetterName()));
+ Record.push_back(VE.getMetadataOrNullID(N->getRawSetterName()));
Record.push_back(N->getAttributes());
Record.push_back(VE.getMetadataOrNullID(N->getType()));
Index: lib/AsmParser/LLParser.cpp
===================================================================
--- lib/AsmParser/LLParser.cpp
+++ lib/AsmParser/LLParser.cpp
@@ -4653,8 +4653,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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47314.148372.patch
Type: text/x-patch
Size: 1669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180524/8ba07f07/attachment.bin>
More information about the llvm-commits
mailing list