diff options
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 8 |
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) { |
