[llvm-branch-commits] [clang] [clang][CallGraphSection] Add type id metadata to indirect call and targets (PR #87573)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 7 10:35:50 PDT 2024
================
@@ -5693,6 +5699,36 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
AllocAlignAttrEmitter AllocAlignAttrEmitter(*this, TargetDecl, CallArgs);
Attrs = AllocAlignAttrEmitter.TryEmitAsCallSiteAttribute(Attrs);
+ if (CGM.getCodeGenOpts().CallGraphSection) {
+ // Create operand bundle only for indirect calls, not for all
+ if (callOrInvoke && *callOrInvoke && (*callOrInvoke)->isIndirectCall()) {
----------------
arsenm wrote:
This double null check, for what I assume is an std::optional<pointer> is really ugly, but I don't actually see where it's defined. Should either just not bother with the optional or without the second check?
https://github.com/llvm/llvm-project/pull/87573
More information about the llvm-branch-commits
mailing list