[clang] [CIR] Return function pointer from `getCallableForCallee` (PR #237275)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 13:01:45 PST 2026


================
@@ -74,3 +74,6 @@ void complex_ops(float _Complex *c, float _Complex v) {
 // OGCG:   store float %{{.*}}, ptr %{{.*}}
 // OGCG:   %[[REAL:.*]] = load float, ptr %{{.*}}
 // OGCG:   %[[INC:.*]] = fadd float %[[REAL]], 1.000000e+00
+
+int call(int (*fp)(int)) { return fp(1); }
+// LLVMCIR: call{{.*}}i32 %{{.*}}(i32 noundef 1)
----------------
andykaylor wrote:

What does OGCG do here?

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


More information about the cfe-commits mailing list