diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-19 22:25:36 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-19 22:25:36 +0000 |
| commit | 7e82e019c6bc974e8819c66fbc386e25dd6ea64a (patch) | |
| tree | 10f4986d0392cba8f3130a33a35218e38273ff47 /clang/test/Modules | |
| parent | a8f1f2efaff0f2de6a7158c33ba714b31ecea19d (diff) | |
| download | bcm5719-llvm-7e82e019c6bc974e8819c66fbc386e25dd6ea64a.tar.gz bcm5719-llvm-7e82e019c6bc974e8819c66fbc386e25dd6ea64a.zip | |
[modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single
option. Previously these options could both be used to specify that you were
compiling the implementation file of a module, with a different set of minor
bugs in each case.
This change removes -fmodule-implementation-of, and instead tracks a flag to
determine whether we're currently building a module. -fmodule-name now behaves
the same way that -fmodule-implementation-of previously did.
llvm-svn: 261372
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/explicit-build/a.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/explicit-build.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Modules/implementation-of-module.m | 14 | ||||
| -rw-r--r-- | clang/test/Modules/import-self.m | 2 |
4 files changed, 8 insertions, 12 deletions
diff --git a/clang/test/Modules/Inputs/explicit-build/a.h b/clang/test/Modules/Inputs/explicit-build/a.h index 5e3602f58ff..a52f7357ff7 100644 --- a/clang/test/Modules/Inputs/explicit-build/a.h +++ b/clang/test/Modules/Inputs/explicit-build/a.h @@ -1,4 +1,4 @@ -#if !__building_module(a) +#if !__building_module(a) && !BUILDING_A_PCH #error "should only get here when building module a" #endif diff --git a/clang/test/Modules/explicit-build.cpp b/clang/test/Modules/explicit-build.cpp index 2a5b70dce6c..a6f6a6268c1 100644 --- a/clang/test/Modules/explicit-build.cpp +++ b/clang/test/Modules/explicit-build.cpp @@ -143,7 +143,7 @@ // ------------------------------- // Try to import a PCH with -fmodule-file= // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ -// RUN: -fmodule-name=a -emit-pch %S/Inputs/explicit-build/a.h -o %t/a.pch \ +// RUN: -fmodule-name=a -emit-pch %S/Inputs/explicit-build/a.h -o %t/a.pch -DBUILDING_A_PCH \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // // RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ diff --git a/clang/test/Modules/implementation-of-module.m b/clang/test/Modules/implementation-of-module.m index 37e2cfbe30f..c07c52c3fc6 100644 --- a/clang/test/Modules/implementation-of-module.m +++ b/clang/test/Modules/implementation-of-module.m @@ -1,22 +1,18 @@ -// RUN: not %clang_cc1 -fmodule-implementation-of Foo -fmodule-name=Bar %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-IMPL-OF-ERR %s -// CHECK-IMPL-OF-ERR: conflicting module names specified: '-fmodule-name=Bar' and '-fmodule-implementation-of Foo' - // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -fmodule-implementation-of category_right -fsyntax-only +// RUN: -fmodule-name=category_right -fsyntax-only // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s +// RUN: -fmodule-name=category_right -dM -E -o - 2>&1 | FileCheck %s // CHECK-NOT: __building_module // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -fmodule-implementation-of category_left -verify +// RUN: -fmodule-name=category_left -verify // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch +// RUN: -fmodule-name=category_right -emit-pch -o %t.pch // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ -// RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right +// RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-name=category_right #ifndef WITH_PREFIX diff --git a/clang/test/Modules/import-self.m b/clang/test/Modules/import-self.m index aa743713237..e5980159245 100644 --- a/clang/test/Modules/import-self.m +++ b/clang/test/Modules/import-self.m @@ -6,6 +6,6 @@ // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -I %S/Inputs/submodules -fmodule-name=import_self %s \ // RUN: 2>&1 | FileCheck -check-prefix=CHECK-fmodule-name %s -// CHECK-fmodule-name: import of module 'import_self.b' appears within same top-level module 'import_self' +// CHECK-fmodule-name: @import of module 'import_self.b' in implementation of 'import_self' @import import_self.b; |

