[llvm-branch-commits] [clang][CallGraphSection] Add type id metadata to indirect call and targets (PR #117036)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 11 18:47:16 PST 2024


================
@@ -5765,6 +5772,25 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
   AllocAlignAttrEmitter AllocAlignAttrEmitter(*this, TargetDecl, CallArgs);
   Attrs = AllocAlignAttrEmitter.TryEmitAsCallSiteAttribute(Attrs);
 
+  if (CGM.getCodeGenOpts().CallGraphSection) {
+    assert((TargetDecl && TargetDecl->getFunctionType() ||
+            Callee.getAbstractInfo().getCalleeFunctionProtoType()) &&
+           "cannot find callsite type");
----------------
arsenm wrote:

Move this to an else llvm_unreachable below to avoid repeating the conditions 

https://github.com/llvm/llvm-project/pull/117036


More information about the llvm-branch-commits mailing list