[PATCH] D48568: objdump: Support newer ObjC image info flags
Dave Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 16:37:17 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336399: objdump: Support newer ObjC image info flags (authored by kastiglione, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D48568
Files:
llvm/trunk/test/tools/llvm-objdump/macho-image-info.test
llvm/trunk/tools/llvm-objdump/MachODump.cpp
Index: llvm/trunk/test/tools/llvm-objdump/macho-image-info.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/macho-image-info.test
+++ llvm/trunk/test/tools/llvm-objdump/macho-image-info.test
@@ -0,0 +1,7 @@
+# RUN: llvm-mc < %s -triple x86_64-darwin -filetype=obj | llvm-objdump -m -objc-meta-data - | FileCheck %s
+
+.section __DATA,__objc_imageinfo,regular,no_dead_strip
+.long 0
+.long 96
+
+# CHECK: OBJC_IMAGE_IS_SIMULATED OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES
Index: llvm/trunk/tools/llvm-objdump/MachODump.cpp
===================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp
@@ -3229,6 +3229,8 @@
/* masks for objc_image_info.flags */
#define OBJC_IMAGE_IS_REPLACEMENT (1 << 0)
#define OBJC_IMAGE_SUPPORTS_GC (1 << 1)
+#define OBJC_IMAGE_IS_SIMULATED (1 << 5)
+#define OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES (1 << 6)
struct message_ref64 {
uint64_t imp; /* IMP (64-bit pointer) */
@@ -5590,6 +5592,10 @@
outs() << " OBJC_IMAGE_IS_REPLACEMENT";
if (o.flags & OBJC_IMAGE_SUPPORTS_GC)
outs() << " OBJC_IMAGE_SUPPORTS_GC";
+ if (o.flags & OBJC_IMAGE_IS_SIMULATED)
+ outs() << " OBJC_IMAGE_IS_SIMULATED";
+ if (o.flags & OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES)
+ outs() << " OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES";
swift_version = (o.flags >> 8) & 0xff;
if (swift_version != 0) {
if (swift_version == 1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48568.154333.patch
Type: text/x-patch
Size: 1519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180705/27a9ee9d/attachment.bin>
More information about the llvm-commits
mailing list