| 1 | // REQUIRES: x86-registered-target |
| 2 | // RUN: rm -rf %t |
| 3 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| 4 | // RUN: -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \ |
| 5 | // RUN: -x objective-c-header %s -o %t.pch -emit-pch |
| 6 | |
| 7 | // Include the pch, as a sanity check. |
| 8 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| 9 | // RUN: -fmodules-ignore-macro=PREFIX -I %S/Inputs/va_list -include-pch %t.pch \ |
| 10 | // RUN: -x objective-c %s -fsyntax-only |
| 11 | |
| 12 | // Repeat the previous emit-pch, but not we will have a global module index. |
| 13 | // For some reason, this results in an identifier for __va_list_tag being |
| 14 | // emitted into the pch. |
| 15 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| 16 | // RUN: -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \ |
| 17 | // RUN: -x objective-c-header %s -o %t.pch -emit-pch |
| 18 | |
| 19 | // Include the pch, which now has __va_list_tag in it, which needs to be merged. |
| 20 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| 21 | // RUN: -fmodules-ignore-macro=PREFIX -I %S/Inputs/va_list -include-pch %t.pch \ |
| 22 | // RUN: -x objective-c %s -fsyntax-only |
| 23 | |
| 24 | // rdar://18039719 |
| 25 | |
| 26 | #ifdef PREFIX |
| 27 | @import va_list_b; |
| 28 | #endif |
| 29 | |