[clang] [llvm] [clang][DebugInfo] Add virtual call-site target information in DWARF. (PR #167666)
Carlos Alberto Enciso via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 16 01:54:51 PST 2026
================
@@ -4978,6 +4978,29 @@ 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;
+
+ // Ignore method types that never can be indirect calls.
+ if (isa<CXXConstructorDecl>(FD) || isa<CXXDestructorDecl>(FD) ||
+ FD->hasAttr<CUDAGlobalAttr>())
+ return;
+
----------------
CarlosAlbertoEnciso wrote:
You are correct. These checks are not required. Keeping just the `isIndirectCall` check.
https://github.com/llvm/llvm-project/pull/167666
More information about the cfe-commits
mailing list