summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorNecip Fazil Yildiran <necip@google.com>2024-04-03 15:20:04 -0700
committerprabhukr <prabhukr@google.com>2024-04-03 15:20:04 -0700
commit71a46c10cced25d66d36bb224131e75b79768397 (patch)
tree9ebc98309a3b662205acadd38b306447e6bd4e37 /clang/lib/CodeGen/CGObjCMac.cpp
parent029e1d751503268e3d8b01db769e710835c3010d (diff)
parent4963b5cf66f47be76d1db52caab0aa83e707538e (diff)
Created using spr 1.3.6-beta.1
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 8a599c10e1ca..291f5aff89ec 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -2220,6 +2220,14 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF,
RValue rvalue = CGF.EmitCall(MSI.CallInfo, Callee, Return, ActualArgs,
&CallSite);
+ // Set type identifier metadata of indirect calls for call graph section.
+ if (CGM.getCodeGenOpts().CallGraphSection && Method && CallSite &&
+ CallSite->isIndirectCall()) {
+ if (const auto *FnType = Method->getFunctionType()) {
+ CGM.CreateFunctionTypeMetadataForIcall(QualType(FnType, 0), CallSite);
+ }
+ }
+
// Mark the call as noreturn if the method is marked noreturn and the
// receiver cannot be null.
if (Method && Method->hasAttr<NoReturnAttr>() && !ReceiverCanBeNull) {