1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // Code on Windows expects to be able to do:
10 //
11 //  #define _USE_MATH_DEFINES
12 //  #include <math.h>
13 //
14 // and receive the definitions of mathematical constants, even if <math.h>
15 // has previously been included. Make sure that works.
16 //
17 
18 #ifdef _MSC_VER
19 #   include <math.h>
20 #   define _USE_MATH_DEFINES
21 #   include <math.h>
22 
23 #   ifndef M_PI
24 #       error M_PI not defined
25 #   endif
26 #endif
27