[llvm-branch-commits] [clang] [llvm] [llvm] Introduce callee_type	metadata (PR #87573)
    Paul Kirth via llvm-branch-commits 
    llvm-branch-commits at lists.llvm.org
       
    Sat May  3 19:20:46 PDT 2025
    
    
  
================
@@ -5096,6 +5097,23 @@ void Verifier::visitCallsiteMetadata(Instruction &I, MDNode *MD) {
   visitCallStackMetadata(MD);
 }
 
+void Verifier::visitCalleeTypeMetadata(Instruction &I, MDNode *MD) {
+  Check(isa<CallBase>(I), "!callee_type metadata should only exist on calls",
+        &I);
+  CallBase *CB = cast<CallBase>(&I);
+  Check(CB->isIndirectCall(),
+        "!callee_type metadata should only exist on indirect function calls",
+        &I);
+  for (const auto &Op : MD->operands()) {
----------------
ilovepi wrote:
nit:
```suggestion
  for (const Operand &Op : MD->operands()) {
```
https://github.com/llvm/llvm-project/pull/87573
    
    
More information about the llvm-branch-commits
mailing list