mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 01:46:06 +00:00

Refer: 7.3.1 from [ISO SPEC](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf) I have added complex variants of F16 and F128 in libc doc but have omitted support for them since we will have to first investigate how their support matrix for clang and gcc looks like, and then add header guards for them accordingly. Planning to add them in follow up PRs once this gets landed.
25 lines
758 B
C
25 lines
758 B
C
//===-- Definition of macros to be used with complex functions ------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef __LLVM_LIBC_MACROS_COMPLEX_MACROS_H
|
|
#define __LLVM_LIBC_MACROS_COMPLEX_MACROS_H
|
|
|
|
#ifndef __STDC_NO_COMPLEX__
|
|
|
|
#define __STDC_VERSION_COMPLEX_H__ 202311L
|
|
|
|
#define complex _Complex
|
|
#define _Complex_I ((_Complex float)1.0fi)
|
|
#define I _Complex_I
|
|
|
|
// TODO: Add imaginary macros once GCC or Clang support _Imaginary builtin-type.
|
|
|
|
#endif
|
|
|
|
#endif // __LLVM_LIBC_MACROS_COMPLEX_MACROS_H
|