[PATCH] D85266: Include math header early to avoid HUGE_VALF redefinition
James Park via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 18:27:13 PDT 2020
jpark37 created this revision.
Herald added a reviewer: deadalnix.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
jpark37 requested review of this revision.
Fix math.h warning if included after DataTypes.h header.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85266
Files:
llvm/include/llvm-c/DataTypes.h
Index: llvm/include/llvm-c/DataTypes.h
===================================================================
--- llvm/include/llvm-c/DataTypes.h
+++ llvm/include/llvm-c/DataTypes.h
@@ -50,9 +50,11 @@
#else /* _MSC_VER */
#ifdef __cplusplus
+#include <cmath>
#include <cstddef>
#include <cstdlib>
#else
+#include <math.h>
#include <stddef.h>
#include <stdlib.h>
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85266.283093.patch
Type: text/x-patch
Size: 376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200805/2d520f5d/attachment.bin>
More information about the llvm-commits
mailing list