aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-04-17 21:11:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-04-17 21:11:07 +0000
commit94effad4c71e4b25b7d56e6392526a55e3a989e7 (patch)
tree5ea917da8af4d6b0c7e8ede3a50fcb9de3abc097
parent099ecfb0ed137665a3394187030d8fd7183fd9d4 (diff)
[tests] Only include stdint.h if we are in freestanding mode.
- We shouldn't even try to include stdint.h in hosted mode, as the dependency on even parsing a platforms stdint.h might fail for some targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179723 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Headers/c11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Headers/c11.c b/test/Headers/c11.c
index ebe2123a2f..21f2e4f222 100644
--- a/test/Headers/c11.c
+++ b/test/Headers/c11.c
@@ -21,12 +21,12 @@ _Static_assert(__alignof(c) == 4, "");
#define __STDC_WANT_LIB_EXT1__ 1
#include <stddef.h>
-#include <stdint.h>
rsize_t x = 0;
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
// we will use the host stdint.h, which may not yet have C11 support).
#ifndef __STDC_HOSTED__
+#include <stdint.h>
rsize_t x2 = RSIZE_MAX;
#endif