diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Modules/ignored_macros.m | 2 | ||||
-rw-r--r-- | clang/test/Modules/implementation-of-module.m | 2 | ||||
-rw-r--r-- | clang/test/PCH/Inputs/modules/Foo.h | 1 | ||||
-rw-r--r-- | clang/test/PCH/Inputs/modules/module.modulemap | 3 | ||||
-rw-r--r-- | clang/test/PCH/cxx-templates.cpp | 2 | ||||
-rw-r--r-- | clang/test/PCH/module-hash-difference.m | 8 |
6 files changed, 15 insertions, 3 deletions
diff --git a/clang/test/Modules/ignored_macros.m b/clang/test/Modules/ignored_macros.m index e8ee50ace31..669db4ddc2d 100644 --- a/clang/test/Modules/ignored_macros.m +++ b/clang/test/Modules/ignored_macros.m @@ -10,7 +10,7 @@ // RUN: %clang_cc1 -fmodules-cache-path=%t.modules -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify // RUN: not %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch %s > %t.err 2>&1 // RUN: FileCheck -check-prefix=CHECK-CONFLICT %s < %t.err -// CHECK-CONFLICT: module 'ignored_macros' found in both +// CHECK-CONFLICT: PCH was compiled with module cache path // Third trial: pass -DIGNORED=1 only to the second invocation, but // make it ignored. There should be no failure, IGNORED is defined in diff --git a/clang/test/Modules/implementation-of-module.m b/clang/test/Modules/implementation-of-module.m index b3984042015..818cce8c36d 100644 --- a/clang/test/Modules/implementation-of-module.m +++ b/clang/test/Modules/implementation-of-module.m @@ -16,7 +16,7 @@ // RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch // RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -DWITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right +// RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right #ifndef WITH_PREFIX diff --git a/clang/test/PCH/Inputs/modules/Foo.h b/clang/test/PCH/Inputs/modules/Foo.h new file mode 100644 index 00000000000..d661dbccbc3 --- /dev/null +++ b/clang/test/PCH/Inputs/modules/Foo.h @@ -0,0 +1 @@ +void make_foo(void); diff --git a/clang/test/PCH/Inputs/modules/module.modulemap b/clang/test/PCH/Inputs/modules/module.modulemap new file mode 100644 index 00000000000..5590b43a2d3 --- /dev/null +++ b/clang/test/PCH/Inputs/modules/module.modulemap @@ -0,0 +1,3 @@ +module Foo { + header "Foo.h" +} diff --git a/clang/test/PCH/cxx-templates.cpp b/clang/test/PCH/cxx-templates.cpp index 52ea8752b36..d50eee0623c 100644 --- a/clang/test/PCH/cxx-templates.cpp +++ b/clang/test/PCH/cxx-templates.cpp @@ -10,7 +10,7 @@ // Test with modules. // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o - -// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s +// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS -fmodules-ignore-macro=NO_ERRORS | FileCheck %s // Test with pch and delayed template parsing. // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h diff --git a/clang/test/PCH/module-hash-difference.m b/clang/test/PCH/module-hash-difference.m new file mode 100644 index 00000000000..073540eb540 --- /dev/null +++ b/clang/test/PCH/module-hash-difference.m @@ -0,0 +1,8 @@ +// RUN: rm -rf %t.mcp +// RUN: rm -rf %t.err +// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp +// RUN: not %clang_cc1 -fsyntax-only -include-pch %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash 2> %t.err +// RUN: FileCheck -input-file=%t.err %s + +// CHECK: error: PCH was compiled with module cache path {{.*}}, but the path is currently {{.*}} +@import Foo; |