[llvm] Reland "[llvm-readobj] Dump callgraph section info for ELF" (PR #176260)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 16 03:04:40 PST 2026
================
@@ -0,0 +1,352 @@
+## Tests that --call-graph-info produces useful warnings if SHT_LLVM_CALL_GRAPH
+## type section processing identifies 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-readobj --elf-output-style=LLVM --call-graph-info %t1 2>&1 | \
+# RUN: FileCheck %s -DFILE=%t1 --check-prefix=WARN-NO-SECTION
+# RUN: llvm-readobj --elf-output-style=JSON --pretty-print --call-graph-info %t1 2>&1 | \
+# RUN: FileCheck %s -DFILE=%t1 --check-prefix=WARN-NO-SECTION
+
+# WARN-NO-SECTION: warning: '[[FILE]]': no SHT_LLVM_CALL_GRAPH section found
----------------
jh7370 wrote:
This check should include the additional context contained in the warning (i.e. the bit after the checked-for text here).
https://github.com/llvm/llvm-project/pull/176260
More information about the llvm-commits
mailing list