Skip to content
Snippets Groups Projects
Commit 94effad4 authored by Daniel Dunbar's avatar Daniel Dunbar
Browse files

[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
parent 099ecfb0
No related branches found
No related tags found
No related merge requests found
...@@ -21,12 +21,12 @@ _Static_assert(__alignof(c) == 4, ""); ...@@ -21,12 +21,12 @@ _Static_assert(__alignof(c) == 4, "");
#define __STDC_WANT_LIB_EXT1__ 1 #define __STDC_WANT_LIB_EXT1__ 1
#include <stddef.h> #include <stddef.h>
#include <stdint.h>
rsize_t x = 0; rsize_t x = 0;
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation // 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). // we will use the host stdint.h, which may not yet have C11 support).
#ifndef __STDC_HOSTED__ #ifndef __STDC_HOSTED__
#include <stdint.h>
rsize_t x2 = RSIZE_MAX; rsize_t x2 = RSIZE_MAX;
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment