================
@@ -551,6 +551,50 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl 
gd, cir::FuncOp fn,
   const auto funcDecl = cast<FunctionDecl>(gd.getDecl());
   curGD = gd;
 
+  if (funcDecl->isInlineBuiltinDeclaration()) {
+    // When generating code for a builtin with an inline declaration, use a
+    // mangled name to hold the actual body, while keeping an external
+    // declaration in case the function pointer is referenced somewhere.
+    std::string fdInlineName = fn.getName().str() + ".inline";
----------------
andykaylor wrote:

We're using the name from the `FuncOp` here, which may be mangled, but the code 
above in `emitDirectCallee` is using the name from `FunctionDecl` which I don't 
think is mangled. The OGCG version of `emitDirectCallee` gets the mangled name.

https://github.com/llvm/llvm-project/pull/163911
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to