From: Adam Nemet Date: Mon, 28 Mar 2016 22:18:53 +0000 (+0000) Subject: [PGO] More comments how function pointers for indirect calls are mapped X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4505b3cbd529781ee352cf8eb8ec7b03b855ff3c;p=clang [PGO] More comments how function pointers for indirect calls are mapped to function names Summary: Hopefully this will make it easier for the next person to figure all this out... Reviewers: bogner, davidxl Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D18489 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264681 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 5e10f26ceb..0693949e43 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -3817,7 +3817,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, CS.setAttributes(Attrs); CS.setCallingConv(static_cast(CallingConv)); - // Insert instrumentation or attach profile metadata at indirect call sites + // Insert instrumentation or attach profile metadata at indirect call sites. + // For more details, see the comment before the definition of + // IPVK_IndirectCallTarget in InstrProfData.inc. if (!CS.getCalledFunction()) PGO.valueProfile(Builder, llvm::IPVK_IndirectCallTarget, CS.getInstruction(), Callee);