================
@@ -4978,6 +4978,24 @@ void CGDebugInfo::EmitFunctionDecl(GlobalDecl GD, 
SourceLocation Loc,
     Fn->setSubprogram(SP);
 }
 
+void CGDebugInfo::addCallTarget(const FunctionDecl *FD, llvm::CallBase *CI) {
+  if (!generateVirtualCallSite())
+    return;
+
+  if (!FD)
+    return;
+
+  // Record only indirect calls.
+  assert(CI && "Invalid Call Instruction.");
+  if (!CI->isIndirectCall())
+    return;
+
+  // Always get method definition.
+  if (llvm::DISubprogram *MD = getFunctionDeclaration(FD))
+    // Attach the target metadata
----------------
CarlosAlbertoEnciso wrote:

Changed first comment to `// Always get the method declaration.`
Removed second comment.

https://github.com/llvm/llvm-project/pull/167666
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to