================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to