[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 11:52:49 PDT 2024


================
@@ -688,7 +688,34 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const FunctionDecl *FD,
                               const CallExpr *E, llvm::Constant *calleeValue) {
   CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E);
   CGCallee callee = CGCallee::forDirect(calleeValue, GlobalDecl(FD));
-  return CGF.EmitCall(E->getCallee()->getType(), callee, E, ReturnValueSlot());
+  RValue Call =
+      CGF.EmitCall(E->getCallee()->getType(), callee, E, ReturnValueSlot());
+
+  // Check the supported intrinsic.
+  if (unsigned BuiltinID = FD->getBuiltinID()) {
+    auto IntrinsicID = [&]() -> unsigned {
----------------
efriedma-quic wrote:

"IntrinsicID" is a boolean; please rename (maybe something like `IsErrnoIntrinsic`).

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


More information about the cfe-commits mailing list