[llvm-branch-commits] [llvm] release/22.x: Revert "[llvm-readobj] Dump callgraph section info for ELF" (#176221) (PR #176228)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 15 11:35:13 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-binary-utilities

Author: None (llvmbot)

<details>
<summary>Changes</summary>

Backport 97576a86eb25696a2b57cd42370991b172c08405

Requested by: @<!-- -->Prabhuk

---

Patch is 52.31 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/176228.diff


8 Files Affected:

- (modified) llvm/docs/CommandGuide/llvm-readelf.rst (+4-12) 
- (modified) llvm/docs/CommandGuide/llvm-readobj.rst (+17-25) 
- (removed) llvm/test/tools/llvm-readobj/ELF/call-graph-info-warn-malformed.test (-366) 
- (removed) llvm/test/tools/llvm-readobj/ELF/call-graph-info.test (-521) 
- (modified) llvm/tools/llvm-readobj/ELFDumper.cpp (+1-277) 
- (modified) llvm/tools/llvm-readobj/ObjDumper.h (-1) 
- (modified) llvm/tools/llvm-readobj/Opts.td (-1) 
- (modified) llvm/tools/llvm-readobj/llvm-readobj.cpp (-4) 


``````````diff
diff --git a/llvm/docs/CommandGuide/llvm-readelf.rst b/llvm/docs/CommandGuide/llvm-readelf.rst
index ed349d1d15761..5403fea60d5ee 100644
--- a/llvm/docs/CommandGuide/llvm-readelf.rst
+++ b/llvm/docs/CommandGuide/llvm-readelf.rst
@@ -38,18 +38,6 @@ OPTIONS
  Display the contents of the basic block address map section(s), which contain the
  address of each function, along with the relative offset of each basic block.
 
-.. option:: --call-graph-info
-
-  Display the call graph section entries i.e. for each function
-  its identifying information, each of its direct callees' information
-  and for each indirect callee a 64 bit number representing the callee's
-  function signature. This information can be used to reconstruct
-  the program call graph.
-
-.. option:: --cg-profile
-
- Display the callgraph profile section.
-
 .. option:: --decompress, -z
 
   Dump decompressed section content when used with ``-x`` or ``-p``.
@@ -75,6 +63,10 @@ OPTIONS
 
  Display the dynamic table.
 
+.. option:: --cg-profile
+
+ Display the callgraph profile section.
+
 .. option:: --histogram, -I
 
  Display a bucket list histogram for dynamic symbol hash tables.
diff --git a/llvm/docs/CommandGuide/llvm-readobj.rst b/llvm/docs/CommandGuide/llvm-readobj.rst
index 4fb2901676898..0d05b947a6b3e 100644
--- a/llvm/docs/CommandGuide/llvm-readobj.rst
+++ b/llvm/docs/CommandGuide/llvm-readobj.rst
@@ -181,17 +181,13 @@ The following options are implemented only for the ELF file format.
  When pgo analysis maps are present, all analyses are printed as their raw
  value.
 
- .. option:: --call-graph-info
-
-  Display the call graph section entries i.e. for each function
-  its identifying information, each of its direct callees' information
-  and for each indirect callee a 64 bit number representing the callee's
-  function signature. This information can be used to reconstruct
-  the program call graph.
+.. option:: --pretty-pgo-analysis-map
 
-.. option:: --cg-profile
+ When pgo analysis maps are present in the basic block address map section(s),
+ analyses with special formats (i.e. BlockFrequency, BranchProbability, etc)
+ are printed using the same format as their respective analysis pass.
 
- Display the callgraph profile section.
+ Requires :option:`--bb-addr-map` to have an effect.
 
 .. option:: --dependent-libraries
 
@@ -209,6 +205,14 @@ The following options are implemented only for the ELF file format.
 
  Display the dynamic table.
 
+.. option:: --cg-profile
+
+ Display the callgraph profile section.
+
+.. option:: --histogram, -I
+
+ Display a bucket list histogram for dynamic symbol hash tables.
+
 .. option:: --elf-linker-options
 
  Display the linker options section.
@@ -220,6 +224,10 @@ The following options are implemented only for the ELF file format.
  structured format. ``GNU`` output mimics the equivalent GNU :program:`readelf`
  output. ``JSON`` is JSON formatted output intended for machine consumption.
 
+.. option:: --section-groups, -g
+
+ Display section groups.
+
 .. option:: --gnu-hash-table
 
  Display the GNU hash table for dynamic symbols.
@@ -232,10 +240,6 @@ The following options are implemented only for the ELF file format.
 
  Display the hash table for dynamic symbols.
 
-.. option:: --histogram, -I
-
- Display a bucket list histogram for dynamic symbol hash tables.
-
 .. option:: --memtag
 
  Display information about memory tagging present in the binary. This includes
@@ -246,14 +250,6 @@ The following options are implemented only for the ELF file format.
 
  Display all notes.
 
-.. option:: --pretty-pgo-analysis-map
-
- When pgo analysis maps are present in the basic block address map section(s),
- analyses with special formats (i.e. BlockFrequency, BranchProbability, etc)
- are printed using the same format as their respective analysis pass.
-
- Requires :option:`--bb-addr-map` to have an effect.
-
 .. option:: --pretty-print
 
  When used with :option:`--elf-output-style`, JSON output will be formatted in
@@ -263,10 +259,6 @@ The following options are implemented only for the ELF file format.
 
  Display the program headers.
 
-.. option:: --section-groups, -g
-
- Display section groups.
-
 .. option:: --section-mapping
 
  Display the section to segment mapping.
diff --git a/llvm/test/tools/llvm-readobj/ELF/call-graph-info-warn-malformed.test b/llvm/test/tools/llvm-readobj/ELF/call-graph-info-warn-malformed.test
deleted file mode 100644
index 63ef662f1a45b..0000000000000
--- a/llvm/test/tools/llvm-readobj/ELF/call-graph-info-warn-malformed.test
+++ /dev/null
@@ -1,366 +0,0 @@
-## Tests that --call-graph-info produces useful warnings
-## if SHT_LLVM_CALL_GRAPH type section processing idenitifies
-## malformed content.
-
-## Tests that --call-graph-info warns if there is no section of type SHT_LLVM_CALL_GRAPH.
-# RUN: yaml2obj --docnum=1 %s -o %t1
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t1 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=WARN_NO_SECTION
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t1 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=WARN_NO_SECTION
-
-# WARN_NO_SECTION: warning: '[[FILE]]': no SHT_LLVM_CALL_GRAPH section found
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-Symbols:
-  - Name:  foo
-...
-
-## Check format version number.
-# RUN: yaml2obj --docnum=2 %s -o %t2
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=WARN_FMT_VERSION
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=WARN_FMT_VERSION
-
-# WARN_FMT_VERSION: warning: '[[FILE]]': unknown format version value [1] in SHT_LLVM_CALL_GRAPH type section
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x01, # Format Version - only supported value is 0x00
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing flags.
-# RUN: yaml2obj --docnum=3 %s -o %t3
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=WARN_MISSING_FLAG
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=WARN_MISSING_FLAG
-
-# WARN_MISSING_FLAG: warning: '[[FILE]]': failed while reading call graph info's Flags unexpected end of data at offset 0x1 while reading [0x1, 0x2)
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      #< Missing flags
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check Flags.
-# RUN: yaml2obj --docnum=4 %s -o %t4
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t4 2>&1 | FileCheck %s -DFILE=%t4 --check-prefix=WARN_FLAG
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t4 2>&1 | FileCheck %s -DFILE=%t4 --check-prefix=WARN_FLAG
-
-# WARN_FLAG: warning: '[[FILE]]': unexpected Flags value [8]
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x08, # Flags - only valid values are 0x00 to 0x07
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing function entry PC.
-# RUN: yaml2obj --docnum=5 %s -o %t5
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t5 2>&1 | FileCheck %s -DFILE=%t5 --check-prefix=WARN_MISSING_PC
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t5 2>&1 | FileCheck %s -DFILE=%t5 --check-prefix=WARN_MISSING_PC
-
-# WARN_MISSING_PC: warning: '[[FILE]]': failed while reading call graph info function entry PC unexpected end of data at offset 0x2 while reading [0x2, 0xa)
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x00, # Flags
-      #< Missing function entry PC
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing function Type ID.
-# RUN: yaml2obj --docnum=6 %s -o %t6
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t6 2>&1 | FileCheck %s -DFILE=%t6 --check-prefix=WARN_MISSING_TYPEID
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t6 2>&1 | FileCheck %s -DFILE=%t6 --check-prefix=WARN_MISSING_TYPEID
-
-# WARN_MISSING_TYPEID: warning: '[[FILE]]': failed while reading function type ID unexpected end of data at offset 0xa while reading [0xa, 0x12)
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x00, # Flags
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Function entry address
-      #< Missing Type ID
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing number of direct callees.
-# RUN: yaml2obj --docnum=7 %s -o %t7
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t7 2>&1 | FileCheck %s -DFILE=%t7 --check-prefix=WARN_MISSING_DIRECT
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t7 2>&1 | FileCheck %s -DFILE=%t7 --check-prefix=WARN_MISSING_DIRECT
-
-# WARN_MISSING_DIRECT: warning: '[[FILE]]': failed while reading number of direct callees unable to decode LEB128 at offset 0x00000012: malformed uleb128, extends past end
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x02, # Flags (HasDirectCallees)
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Function entry address
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # TypeID unknown
-      #< Missing NumDirectCallees (ULEB128)
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing direct callee.
-# RUN: yaml2obj --docnum=8 %s -o %t8
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t8 2>&1 | FileCheck %s -DFILE=%t8 --check-prefix=WARN_MISSING_CALLEE
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t8 2>&1 | FileCheck %s -DFILE=%t8 --check-prefix=WARN_MISSING_CALLEE
-
-# WARN_MISSING_CALLEE: warning: '[[FILE]]': failed while reading direct callee unexpected end of data at offset 0x13 while reading [0x13, 0x1b)
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x02, # Flags (HasDirectCallees)
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Function entry address
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # TypeID unknown
-      0x01, # NumDirectCallees
-      #< Missing direct callee address
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing number of indirect target type IDs.
-# RUN: yaml2obj --docnum=9 %s -o %t9
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t9 2>&1 | FileCheck %s -DFILE=%t9 --check-prefix=WARN_MISSING_NUM_INDIRECT
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t9 2>&1 | FileCheck %s -DFILE=%t9 --check-prefix=WARN_MISSING_NUM_INDIRECT
-
-# WARN_MISSING_NUM_INDIRECT: warning: '[[FILE]]': failed while reading number of indirect target type IDs unable to decode LEB128 at offset 0x00000012: malformed uleb128, extends past end
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_DYN
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x04, # Flags (HasIndirectCallees)
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Function entry address
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # TypeID unknown
-      #< Missing NumIndirectTargetTypeIDs (ULEB128)
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing indirect target type ID.
-# RUN: yaml2obj --docnum=10 %s -o %t10
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t10 2>&1 | FileCheck %s -DFILE=%t10 --check-prefix=WARN_MISSING_INDIRECT_TARGET_TYPE_ID
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t10 2>&1 | FileCheck %s -DFILE=%t10 --check-prefix=WARN_MISSING_INDIRECT_TARGET_TYPE_ID
-
-# WARN_MISSING_INDIRECT_TARGET_TYPE_ID: warning: '[[FILE]]': failed while reading indirect target type ID unexpected end of data at offset 0x13 while reading [0x13, 0x1b)
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_REL
-  Machine:  EM_X86_64
-Sections:
-  - Name:  .text
-    Type:  SHT_PROGBITS
-    Size:  5
-  - Name:  .llvm.callgraph
-    Type:  SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-      # --- Entry 1: foo (foo) ---
-      0x00, # Format Version
-      0x04, # Flags (HasIndirectCallees)
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Function entry address
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # TypeID unknown
-      0x01, # NumIndirectTargetTypeIDs (1)
-      #< Missing indirect call entries here.
-    ]
-Symbols:
-  - Name:  foo
-...
-
-## Check missing relocation information.
-# RUN: yaml2obj --docnum=11 %s -o %t11
-# RUN: llvm-readelf --call-graph-info %t11 2>&1 | count 0
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t11 2>&1 | FileCheck %s -DFILE=%t11 --check-prefix=WARN_NO_RELOC
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t11 2>&1 | FileCheck %s -DFILE=%t11 --check-prefix=WARN_NO_RELOC
-
-# WARN_NO_RELOC: warning: '[[FILE]]': SHT_LLVM_CALL_GRAPH type section has unknown type id for 2 indirect targets
-# WARN_NO_RELOC: warning: '[[FILE]]': unknown relocation at offset 2
-# WARN_NO_RELOC: warning: '[[FILE]]': unknown relocation at offset 19
-# WARN_NO_RELOC: warning: '[[FILE]]': unknown relocation at offset 29
-# WARN_NO_RELOC: warning: '[[FILE]]': unknown relocation at offset 56
-
---- !ELF
-FileHeader:
-  Class:    ELFCLASS64
-  Data:     ELFDATA2LSB
-  Type:     ET_REL
-  Machine:  EM_X86_64
-Sections:
-  - Name: .text
-    Type: SHT_PROGBITS
-    Size: 12 # or whatever size is needed for all the data
-  - Name: .llvm.callgraph
-    Type: SHT_LLVM_CALL_GRAPH
-    ContentArray: [
-        '0', # Format version number
-        '3', # Flag IsIndirectTarget true, HasDirectCallees true
-        '0', '0', '0', '0', '0', '0', '0', '0', # foo()'s address
-        '0', '0', '0', '0', '0', '0', '0', '0', # foo()'s TypeID Unknown
-        '1', # NumDirectCallees
-        '0', '0', '0', '0', '0', '0', '0', '0', # Direct callee foo()'s address
-        '0', # Format version number
-        '5', # Flag IsIndirectTarget true, HasIndirectTargetTypeIDs true
-        '6', '0', '0', '0', '0', '0', '0', '0', # bar()'s address
-        '0', '0', '0', '0', '0', '0', '0', '0', # bar()'s TypeID Unknown
-        '1', # NumIndirectTargetTypeIDs
-        '16', '0', '0', '0', '0', '0', '0', '0', # Indirect callee type ID
-        '0', # Format version number
-        '1', # Flag IsIndirectTarget true
-        '10', '0', '0', '0', '0', '0', '0', '0', # baz()'s address
-        '32', '0', '0', '0', '0', '0', '0', '0', # baz()'s TypeID Unknown
-      ]
-  - Name:   .rela.llvm.callgraph
-    Type:   SHT_RELA
-    Flags:  [ SHF_INFO_LINK ]
-    Link:   .symtab
-    Relocations:
-      # 1. Pointer to foo() definition
-      - Offset: 0x2
-        Symbol: foo
-        Type:   R_X86_64_64
-
-      # 2. Pointer to the call site "callq foo" (offset 5 inside foo)
-      #    We relocate against 'foo' and add 5 to get the address of the instruction.
-      - Offset: 0x13
-        Symbol: foo
-        Type:   R_X86_64_64
-        Addend: 5
-
-      # 3. Pointer to bar() definition
-      - Offset: 0x1D
-        Symbol: bar
-        Type:   R_X86_64_64
-
-      # 4. Pointer to baz() definition
-      - Offset: 0x38
-        Symbol: baz
-        Type:   R_X86_64_64
-Symbols:
-  - Name:  foo
-  - Name:  bar
-  - Name:  baz
-...
diff --git a/llvm/test/tools/llvm-readobj/ELF/call-graph-info.test b/llvm/test/tools/llvm-readobj/ELF/call-graph-info.test
deleted file mode 100644
index 7226dd8ddea89..0000000000000
--- a/llvm/test/tools/llvm-readobj/ELF/call-graph-info.test
+++ /dev/null
@@ -1,521 +0,0 @@
-## Tests how --call-graph-info prints the call graph information.
-
-## Check non-relocatable object file handling.
-# RUN: yaml2obj --docnum=1 %s -o %t1
-# RUN: llvm-readelf --call-graph-info %t1 2>&1 | FileCheck %s --match-full-lines --allow-empty --check-prefix=GNU_NONRELOC -DFILE=%t1
-# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t1 2>&1 | FileCheck %s --match-full-lines --check-prefix=LLVM_NONRELOC -DFILE=%t1
-# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t1 2>&1 | FileCheck %s --match-full-lines --check-prefix=JSON_NONRELOC -DFILE=%t1
-
-## We do not support GNU format console output for --call-graph-info as it is an LLVM only info.
-# GNU_NONRELOC-NOT: .
-
-# LLVM_NONRELOC:      CallGraph [
-# LLVM_NONRELOC-NEXT:     Function {
-# LLVM_NONRELOC-NEXT:       Names: [foo]
-# LLVM_NONRELOC-NEXT:       Address: 0x1790
-# LLVM_NONRELOC-NEXT:       Version: 0
-# LLVM_NONRELOC-NEXT:       IsIndirectTarget: Yes
-# LLVM_NONRELOC-NEXT:       TypeId: 0x3ECBEEF531F74424
-# LLVM_NONRELOC-NEXT:       NumDirectCallees: 0
-# LLVM_NONRELOC-NEXT:       DirectCallees [
-# LLVM_NONRELOC-NEXT:       ]
-# LLVM_NONRELOC-NEXT:       NumIndirectTargetTypeIDs: 0
-# LLVM_NONRELOC-NEXT:       IndirectTypeIDs: []
-# LLVM_NONRELOC-NEXT:     }
-# LLVM_NONRELOC-NEXT:     Function {
-# LLVM_NONRELOC-NEXT:       Names: [bar]
-# LLVM_NONRELOC-NEXT:       Address: 0x17A0
-# LLVM_NONRELOC-NEXT:       Version: 0
-# LLVM_NONRELOC-NEXT:       IsIndirectTarget: Yes
-# LLVM_NONRELOC-NEXT:       TypeId: 0x3ECBEEF531F74424
-# LLVM_NONRELOC-NEXT:       NumDirectCallees: 0
-# LLVM_NONRELOC-NEXT:       DirectCallees [
-# LLVM_NONRELOC-NEXT:       ]
-# LLVM_NONRELOC-NEXT:       NumIndirectTargetTypeIDs: 0
-# LLVM_NONRELOC-NEXT:       IndirectTypeIDs: []
-# LLVM_NONRELOC-NEXT:     }
-# LLVM_NONRELOC-NEXT:     Function {
-# LLVM_NONRELOC-NEXT:       Names: [baz]
-# LLVM_NONRELOC-NEXT:       Address: 0x17B0
-# LLVM_NONRELOC-NEXT:       Version: 0
-# LLVM_NONRELOC-NEXT:       IsIndirectTarget: Yes
-# LLVM_NONRELOC-NEXT:       TypeId: 0x308E4B8159BC8654
-# LLVM_NONRELOC-NEXT:       NumDirectCallees: 0
-# LLVM_NONRELOC-NEXT:       DirectCallees [
-# LLVM_NONRELOC-NEXT:       ]
-# LLVM_NONRELOC-NEXT:       NumIndirectTargetTypeIDs: 0
-# LLVM_NONRELOC-NEXT:       IndirectTypeIDs: []
-# LLVM_NONRELOC-NEXT:     }
-# LLVM_NONRELOC-NEXT:     Function {
-# LLVM_NONRELOC-NEXT:       Names: [main]
-# LLVM_NONRELOC-NEXT:       Address: 0x17C0
-# LLVM_NONRELOC-NEXT:       Version: 0
-# LLVM_NONRELOC-NEXT:       IsIndirectTarget: Yes
-# LLVM_NONRELOC-NEXT:       TypeId: 0xFA6809609A76AFCA
-# LLVM_NONRELOC-NEXT:       NumDirectCallees: 3
-# LLVM_NONRELOC-NEXT:       Direc...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/176228


More information about the llvm-branch-commits mailing list