[clang] [llvm] [llvm] Extract and propagate callee_type metadata (PR #87575)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 01:11:57 PDT 2025


================
@@ -517,6 +520,32 @@ class LLVM_ABI MachineFunction {
     SmallVector<ArgRegPair, 1> ArgRegPairs;
     /// Callee type ids.
     SmallVector<ConstantInt *, 4> CalleeTypeIds;
+
+    CallSiteInfo() = default;
+
+    /// Extracts the numeric type id from the CallBase's callee_type Metadata,
+    /// and sets CalleeTypeIds. This is used as type id for the indirect call in
+    /// the call graph section.
+    CallSiteInfo(const CallBase &CB) {
----------------
nikic wrote:

This should not be defined in the header. Move this out of line and remove all the new includes please.

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


More information about the llvm-commits mailing list