[PATCH] D71201: [ObjC][DWARF] Emit DW_AT_APPLE_objc_direct for methods marked as __attribute__((objc_direct))

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 17:07:37 PST 2019


aprantl added inline comments.


================
Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:93
 HANDLE_DISP_FLAG((1u << 9), Deleted)
+HANDLE_DISP_FLAG((1u << 10), ObjCDirect)
 
----------------
I think it would be good to leave a gap for https://reviews.llvm.org/D68117 here.
@SouraVX what's the latest plan for representing deleted/defaulted?


================
Comment at: llvm/test/DebugInfo/X86/objc_direct.ll:47
+@"_OBJC_CLASS_RO_$_Root" = internal global %struct._class_ro_t { i32 2, i32 0, i32 0, i8* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @OBJC_CLASS_NAME_, i32 0, i32 0), %struct.__method_list_t* null, %struct._objc_protocol_list* null, %struct._ivar_list_t* null, i8* null, %struct._prop_list_t* null }, section "__DATA, __objc_const", align 8
+@"OBJC_LABEL_CLASS_$" = internal global [1 x i8*] [i8* bitcast (%struct._class_t* @"OBJC_CLASS_$_Root" to i8*)], section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
+ at llvm.compiler.used = appending global [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @OBJC_CLASS_NAME_, i32 0, i32 0), i8* bitcast ([1 x i8*]* @"OBJC_LABEL_CLASS_$" to i8*)], section "llvm.metadata"
----------------
Could we make do in this test without all the ObjC metadata?


================
Comment at: llvm/test/DebugInfo/X86/objc_direct.ll:81
+
+attributes #0 = { noinline optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone speculatable willreturn }
----------------
Please remove all quoted attributes, they cause trouble for maintaining the test in the future and usually aren't needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71201/new/

https://reviews.llvm.org/D71201





More information about the llvm-commits mailing list