[llvm] [llvm][AsmPrinter] Call graph section format. (PR #159866)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 14:11:21 PDT 2025
================
@@ -36,24 +42,50 @@ entry:
!4 = !{!5}
!5 = !{i64 0, !"_ZTSFPvS_E.generalized"}
-; CHECK: .section .callgraph,"o", at progbits,.text
+; X64: .section .callgraph,"o", at progbits,.text
+;; Version
+; X64-NEXT: .byte 0
+;; Flags
+; X64-NEXT: .byte 7
+;; Function Entry PC
+; X64-NEXT: .quad [[LABEL_FUNC]]
+;; Function type ID -- set to 0 as no type metadata attached to function.
+; X64-NEXT: .quad 0
+;; Number of unique direct callees.
+; X64-NEXT: .byte 3
+;; Direct callees.
+; X64-NEXT: .quad direct_foo
+; X64-NEXT: .quad direct_bar
+; X64-NEXT: .quad direct_baz
+;; Number of unique indirect target type IDs.
+; X64-NEXT: .byte 3
+;; Indirect type IDs.
+; X64-NEXT: .quad 4524972987496481828
+; X64-NEXT: .quad 3498816979441845844
+; X64-NEXT: .quad 8646233951371320954
+
+; ARM32: .section .callgraph,"o",%progbits,.text
;; Version
-; CHECK-NEXT: .byte 0
+; ARM32-NEXT: .byte 0
;; Flags
-; CHECK-NEXT: .byte 7
+; ARM32-NEXT: .byte 7
;; Function Entry PC
-; CHECK-NEXT: .quad [[LABEL_FUNC]]
+; ARM32-NEXT: .long [[LABEL_FUNC]]
;; Function type ID -- set to 0 as no type metadata attached to function.
-; CHECK-NEXT: .quad 0
+; ARM32-NEXT: .long 0
+; ARM32-NEXT: .long 0
;; Number of unique direct callees.
-; CHECK-NEXT: .byte 3
+; ARM32-NEXT: .byte 3
;; Direct callees.
-; CHECK-NEXT: .quad direct_foo
-; CHECK-NEXT: .quad direct_bar
-; CHECK-NEXT: .quad direct_baz
+; ARM32-NEXT: .long direct_foo
+; ARM32-NEXT: .long direct_bar
+; ARM32-NEXT: .long direct_baz
;; Number of unique indirect target type IDs.
-; CHECK-NEXT: .byte 3
+; ARM32-NEXT: .byte 3
;; Indirect type IDs.
-; CHECK-NEXT: .quad 4524972987496481828
-; CHECK-NEXT: .quad 3498816979441845844
-; CHECK-NEXT: .quad 8646233951371320954
+; ARM32-NEXT: .long 838288420
+; ARM32-NEXT: .long 1053552373
+; ARM32-NEXT: .long 1505527380
+; ARM32-NEXT: .long 814631809
+; ARM32-NEXT: .long 342417018
+; ARM32-NEXT: .long 2013108216
----------------
ilovepi wrote:
I don't think you can put this in a test under `CodeGen/X86`. You'd need to dupe it under `CodeGen/ARM`
https://github.com/llvm/llvm-project/pull/159866
More information about the llvm-commits
mailing list