[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 12 23:01:33 PDT 2025
================
@@ -0,0 +1,50 @@
+;; Tests that we store the type identifiers in .callgraph section of the binary.
+
+; RUN: llc --call-graph-section -filetype=obj -o - < %s | \
+; RUN: llvm-readelf -x .callgraph - | FileCheck %s
+
+declare !type !4 void @foo() #0
+
+declare !type !5 noundef i32 @bar(i8 signext %a) #0
+
+declare !type !6 noundef ptr @baz(ptr %a) #0
+
+; Function Attrs: noinline nounwind optnone uwtable
+define dso_local void @main() #0 !type !7 {
+entry:
+ %retval = alloca i32, align 4
+ %fp_foo = alloca ptr, align 8
+ %a = alloca i8, align 1
+ %fp_bar = alloca ptr, align 8
+ %fp_baz = alloca ptr, align 8
+ store i32 0, ptr %retval, align 4
+ store ptr @foo, ptr %fp_foo, align 8
+ %0 = load ptr, ptr %fp_foo, align 8
----------------
arsenm wrote:
Use named values in tests
https://github.com/llvm/llvm-project/pull/87576
More information about the llvm-branch-commits
mailing list