[libc-commits] [libc] [libc] fix FEnvImpl not using the proxy header (PR #89303)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Apr 18 13:35:14 PDT 2024


https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/89303

In the recent fenv.h header cleanup, two FEnvImpl.h files were missed,
causing build issues. This patch fixes that.


>From b2455fecab84cd0db90b3da918a18323422c0014 Mon Sep 17 00:00:00 2001
From: Michael Jones <michaelrj at google.com>
Date: Thu, 18 Apr 2024 13:34:11 -0700
Subject: [PATCH] [libc] fix FEnvImpl not using the proxy header

In the recent fenv.h header cleanup, two FEnvImpl.h files were missed,
causing build issues. This patch fixes that.
---
 libc/src/__support/FPUtil/FEnvImpl.h       | 3 ++-
 libc/src/__support/FPUtil/riscv/FEnvImpl.h | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 4be1a57f0f4b38..13e668becc651a 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -9,11 +9,12 @@
 #ifndef LLVM_LIBC_SRC___SUPPORT_FPUTIL_FENVIMPL_H
 #define LLVM_LIBC_SRC___SUPPORT_FPUTIL_FENVIMPL_H
 
+#include "hdr/fenv_macros.h"
 #include "hdr/math_macros.h"
+#include "hdr/types/fenv_t.h"
 #include "src/__support/macros/attributes.h" // LIBC_INLINE
 #include "src/__support/macros/properties/architectures.h"
 #include "src/errno/libc_errno.h"
-#include <fenv.h>
 
 #if defined(LIBC_TARGET_ARCH_IS_AARCH64)
 #if defined(__APPLE__)
diff --git a/libc/src/__support/FPUtil/riscv/FEnvImpl.h b/libc/src/__support/FPUtil/riscv/FEnvImpl.h
index 6e940453f7a94d..e7aee3ba4b9109 100644
--- a/libc/src/__support/FPUtil/riscv/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/riscv/FEnvImpl.h
@@ -15,7 +15,6 @@
 #include "src/__support/macros/attributes.h" // For LIBC_INLINE_ASM
 #include "src/__support/macros/config.h"     // For LIBC_INLINE
 
-#include <fenv.h>
 #include <stdint.h>
 
 namespace LIBC_NAMESPACE {



More information about the libc-commits mailing list