[clang] [clang] callee_type metadata for indirect calls (PR #163233)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 16:28:41 PDT 2025


================
@@ -0,0 +1,147 @@
+// Tests that we assign appropriate identifiers to indirect calls and targets
+// specifically for C++ class and instance methods.
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \
+// RUN: -emit-llvm -o %t %s
+// RUN: FileCheck --check-prefix=FT %s < %t
+// RUN: FileCheck --check-prefix=CST %s < %t
+
+////////////////////////////////////////////////////////////////////////////////
+// Class definitions (check for indirect target metadata)
+
+class Cls1 {
+public:
+  // FT-LABEL: define {{.*}} ptr @_ZN4Cls18receiverEPcPf(
+  // FT: {{.*}} !type [[F_TCLS1RECEIVER:![0-9]+]]
----------------
ilovepi wrote:

```suggestion
  // FT-SAME: {{.*}} !type [[F_TCLS1RECEIVER:![0-9]+]]
```
for consistency.

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


More information about the cfe-commits mailing list