@@ -4958,11 +4958,7 @@ void CGDebugInfo::EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc,
49584958 Fn->setSubprogram (SP);
49594959}
49604960
4961- bool CGDebugInfo::generateCallSiteForPS () const {
4962- // The added call target will be available only for SCE targets.
4963- if (CGM.getCodeGenOpts ().getDebuggerTuning () != llvm::DebuggerKind::SCE)
4964- return false ;
4965-
4961+ bool CGDebugInfo::generateVirtualCallSite () const {
49664962 // Check general conditions for call site generation.
49674963 return (getCallSiteRelatedAttrs () != llvm::DINode::FlagZero);
49684964}
@@ -4976,7 +4972,7 @@ void CGDebugInfo::addCallTargetMetadata(llvm::MDNode *MD, llvm::CallBase *CI) {
49764972
49774973// Finalize call_target generation.
49784974void CGDebugInfo::finalizeCallTarget () {
4979- if (!generateCallSiteForPS ())
4975+ if (!generateVirtualCallSite ())
49804976 return ;
49814977
49824978 for (auto &E : CallTargetCache) {
@@ -4989,7 +4985,7 @@ void CGDebugInfo::finalizeCallTarget() {
49894985
49904986void CGDebugInfo::addCallTarget (StringRef Name, llvm::MDNode *MD,
49914987 llvm::CallBase *CI) {
4992- if (!generateCallSiteForPS ())
4988+ if (!generateVirtualCallSite ())
49934989 return ;
49944990
49954991 // Record only indirect calls.
@@ -5019,7 +5015,7 @@ void CGDebugInfo::addCallTarget(StringRef Name, llvm::MDNode *MD,
50195015
50205016void CGDebugInfo::addCallTarget (llvm::Function *F, const FunctionDecl *FD,
50215017 llvm::CallBase *CI) {
5022- if (!generateCallSiteForPS ())
5018+ if (!generateVirtualCallSite ())
50235019 return ;
50245020
50255021 if (!F && !FD)
@@ -5035,7 +5031,7 @@ void CGDebugInfo::addCallTarget(llvm::Function *F, const FunctionDecl *FD,
50355031}
50365032
50375033void CGDebugInfo::removeCallTarget (StringRef Name) {
5038- if (!generateCallSiteForPS ())
5034+ if (!generateVirtualCallSite ())
50395035 return ;
50405036
50415037 auto It = CallTargetCache.find (Name);
@@ -5044,7 +5040,7 @@ void CGDebugInfo::removeCallTarget(StringRef Name) {
50445040}
50455041
50465042void CGDebugInfo::removeCallTarget (llvm::Function *F) {
5047- if (!generateCallSiteForPS ())
5043+ if (!generateVirtualCallSite ())
50485044 return ;
50495045
50505046 if (F && F->hasName ())
0 commit comments