Skip to content

Commit 3a29393

Browse files
committed
Remove math.h/cmath include from DataTypes.h
DataTypes.h is meant to wrap the integer type and limits headers, which have some unfortunate variance. The FP math functions declared by math.h are not unnecessary. math.h took a noticeable amount of time to parse (~40ms), but that could be startup costs. Anyway, we don't need to include it, so skipping it can't hurt. This has been present since the initial CMake build was added in 2008.
1 parent 9ed0612 commit 3a29393

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

llvm/include/llvm-c/DataTypes.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
#ifndef LLVM_C_DATATYPES_H
2525
#define LLVM_C_DATATYPES_H
2626

27-
#ifdef __cplusplus
28-
#include <cmath>
29-
#else
30-
#include <math.h>
31-
#endif
32-
3327
#include <inttypes.h>
3428
#include <stdint.h>
3529

0 commit comments

Comments
 (0)