diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-03 00:31:35 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-03 00:31:35 +0000 |
| commit | ef99e4d88a251ca162e5611b05ea769a8574a68d (patch) | |
| tree | ebbd3fcf8eeb5f511d5fc2b355c2934df09d341c /clang/test/Modules/Inputs/StdDef | |
| parent | 5312afe7e1b9646d096e92b30fcaf720c93186f9 (diff) | |
| download | bcm5719-llvm-ef99e4d88a251ca162e5611b05ea769a8574a68d.tar.gz bcm5719-llvm-ef99e4d88a251ca162e5611b05ea769a8574a68d.zip | |
Fix interaction of max_align_t and modules.
When building with modules enabled, we were defining max_align_t as a typedef
for a different anonymous struct type each time it was included, resulting in
an error if <stddef.h> is not covered by a module map and is included more than
once in the same modules-enabled compilation of C11 or C++11 code.
llvm-svn: 218931
Diffstat (limited to 'clang/test/Modules/Inputs/StdDef')
| -rw-r--r-- | clang/test/Modules/Inputs/StdDef/include_again.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/StdDef/module.map | 10 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/StdDef/ptrdiff_t.h | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/StdDef/include_again.h b/clang/test/Modules/Inputs/StdDef/include_again.h new file mode 100644 index 00000000000..f29f6366cc6 --- /dev/null +++ b/clang/test/Modules/Inputs/StdDef/include_again.h @@ -0,0 +1,2 @@ +#include <stddef.h> + diff --git a/clang/test/Modules/Inputs/StdDef/module.map b/clang/test/Modules/Inputs/StdDef/module.map index 69c69eac35b..5c4e0dae7ba 100644 --- a/clang/test/Modules/Inputs/StdDef/module.map +++ b/clang/test/Modules/Inputs/StdDef/module.map @@ -8,4 +8,14 @@ module StdDef { header "other.h" export * } + + module PtrDiffT { + header "ptrdiff_t.h" + export * + } + + module IncludeAgain { + header "include_again.h" + export * + } } diff --git a/clang/test/Modules/Inputs/StdDef/ptrdiff_t.h b/clang/test/Modules/Inputs/StdDef/ptrdiff_t.h new file mode 100644 index 00000000000..acb0ab81ffc --- /dev/null +++ b/clang/test/Modules/Inputs/StdDef/ptrdiff_t.h @@ -0,0 +1,2 @@ +#define __need_ptrdiff_t +#include <stddef.h> |

