xref: /llvm-project/libc/src/fenv/fegetenv.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
1b7e05c87SSiva Chandra Reddy //===-- Implementation of fegetenv function -----------------------------===//
2b7e05c87SSiva Chandra Reddy //
3b7e05c87SSiva Chandra Reddy // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4b7e05c87SSiva Chandra Reddy // See https://llvm.org/LICENSE.txt for license information.
5b7e05c87SSiva Chandra Reddy // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6b7e05c87SSiva Chandra Reddy //
7b7e05c87SSiva Chandra Reddy //===----------------------------------------------------------------------===//
8b7e05c87SSiva Chandra Reddy 
9b7e05c87SSiva Chandra Reddy #include "src/fenv/fegetenv.h"
1076ec69a9STue Ly #include "src/__support/FPUtil/FEnvImpl.h"
11b7e05c87SSiva Chandra Reddy #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
13b7e05c87SSiva Chandra Reddy 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
15b7e05c87SSiva Chandra Reddy 
16b7e05c87SSiva Chandra Reddy LLVM_LIBC_FUNCTION(int, fegetenv, (fenv_t * envp)) {
171c92911eSMichael Jones   return fputil::get_env(envp);
18b7e05c87SSiva Chandra Reddy }
19b7e05c87SSiva Chandra Reddy 
20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
21