From: Manuel Klimek Date: Mon, 19 May 2014 11:51:44 +0000 (+0000) Subject: Make the ARCMT tests self-contained. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2510d5dfb8a54a032fbc501ea171576e7c4b3ec;p=clang Make the ARCMT tests self-contained. This is necessary to reduce staging times on parallel build systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209120 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h b/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h new file mode 100644 index 0000000000..f7f9fb66c9 --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h @@ -0,0 +1,5 @@ +#ifndef MODULE_SUBFRAMEWORK_H +#define MODULE_SUBFRAMEWORK_H +#__private_macro MODULE_SUBFRAMEWORK_H +char *module_subframework; +#endif diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h b/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h new file mode 100644 index 0000000000..6e81adcb2b --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h @@ -0,0 +1 @@ +unsigned *Buried_Treasure; diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Module.h b/test/ARCMT/Inputs/Module.framework/Headers/Module.h new file mode 100644 index 0000000000..3d2476b204 --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Headers/Module.h @@ -0,0 +1,28 @@ +// expected-warning 0-1 {{umbrella header}} + +// FIXME: The "umbrella header" warning should be moved to a separate test. +// This "0-1" is only here because the warning is only emitted when the +// module is (otherwise) successfully included. + +#ifndef MODULE_H +#define MODULE_H +const char *getModuleVersion(void); + +#ifdef FOO +# error Module should have been built without -DFOO +#endif + +@interface Module ++(const char *)version; // retrieve module version ++alloc; +@end + +#define MODULE_H_MACRO 1 +#__private_macro MODULE_H_MACRO + +#include +#include + +__asm("foo"); + +#endif // MODULE_H diff --git a/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h b/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h new file mode 100644 index 0000000000..6b15791eb2 --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h @@ -0,0 +1 @@ +int not_in_module; diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Sub.h b/test/ARCMT/Inputs/Module.framework/Headers/Sub.h new file mode 100644 index 0000000000..dea76e7646 --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Headers/Sub.h @@ -0,0 +1,3 @@ +#include +int *Module_Sub; + diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h b/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h new file mode 100644 index 0000000000..beed4a862d --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h @@ -0,0 +1 @@ +int *Module_Sub2; diff --git a/test/ARCMT/Inputs/Module.framework/Module b/test/ARCMT/Inputs/Module.framework/Module new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h b/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h new file mode 100644 index 0000000000..0782336df9 --- /dev/null +++ b/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h @@ -0,0 +1 @@ +int module_private; diff --git a/test/ARCMT/Inputs/module.map b/test/ARCMT/Inputs/module.map new file mode 100644 index 0000000000..061abbd24d --- /dev/null +++ b/test/ARCMT/Inputs/module.map @@ -0,0 +1,309 @@ +module c_library [extern_c] { module inner { header "c-header.h" } } +module cxx_library { header "cxx-header.h" requires cplusplus } +module c_library_bad [extern_c] { header "c-header-bad.h" } +module diamond_top { header "diamond_top.h" } +module diamond_left { + header "diamond_left.h" + export diamond_top +} +module diamond_right { + header "diamond_right.h" + export diamond_top +} +module diamond_bottom { + header "diamond_bottom.h" + export * +} +module irgen { header "irgen.h" } +module cxx_irgen_top { header "cxx-irgen-top.h" } +module cxx_irgen_left { header "cxx-irgen-left.h" } +module cxx_irgen_right { header "cxx-irgen-right.h" } +module lookup_left_objc { header "lookup_left.h" } +module lookup_right_objc { header "lookup_right.h" } +module lookup_left_cxx { header "lookup_left.hpp" } +module lookup_right_cxx { header "lookup_right.hpp" } +module module_private_left { header "module_private_left.h" } +module module_private_right { header "module_private_right.h" } +module macros_top { + header "macros_top.h" + explicit module b { header "macros_top_b.h" } + explicit module c { header "macros_top_c.h" } +} +module macros_left { + header "macros_left.h" + export * +} +module macros_right { + header "macros_right.h" + export * + explicit module undef { + header "macros_right_undef.h" + } +} +module macros { header "macros.h" } +module macros_other { header "macros_other.h" } +module category_top { header "category_top.h" } +module category_left { + header "category_left.h" + export category_top + + explicit module sub { + header "category_left_sub.h" + } +} +module category_right { + header "category_right.h" + export category_top + + explicit module sub { + header "category_right_sub.h" + } +} +module category_bottom { + header "category_bottom.h" + export category_left + export category_right +} +module category_other { header "category_other.h" } +module redeclarations_left { header "redeclarations_left.h" } +module redeclarations_right { header "redeclarations_right.h" } +module redecl_namespaces_left { header "redecl_namespaces_left.h" } +module redecl_namespaces_right { header "redecl_namespaces_right.h" } +module redecl_add_after_load_top { header "redecl-add-after-load-top.h" } +module redecl_add_after_load { header "redecl-add-after-load.h" } +module load_failure { header "load_failure.h" } + +module decldef { + explicit module Decl { header "decl.h" } + explicit module Decl2 { header "decl2.h" } + explicit module Def { header "def.h" } +} + +module redecl_merge_top { + header "redecl-merge-top.h" + explicit module Explicit { header "redecl-merge-top-explicit.h" } + exclude header "nonexistent.h" +} +module redecl_merge_left { + header "redecl-merge-left.h" + export * +} +module redecl_merge_left_left { + header "redecl-merge-left-left.h" + export * +} +module redecl_merge_right { + header "redecl-merge-right.h" + export * +} +module redecl_merge_bottom { + explicit module prefix { + header "redecl-merge-bottom-prefix.h" + } + + header "redecl-merge-bottom.h" + export * +} +module namespaces_top { + header "namespaces-top.h" + export * +} +module namespaces_left { + header "namespaces-left.h" + export * +} +module namespaces_right { + header "namespaces-right.h" + export * +} +module templates_top { + header "templates-top.h" + export * +} +module templates_left { + header "templates-left.h" + export * +} +module templates_right { + header "templates-right.h" + export * +} +module MethodPoolA { + header "MethodPoolA.h" + + explicit module Sub2 { + header "MethodPoolASub2.h" + } + + explicit module Sub { + header "MethodPoolASub.h" + } +} +module MethodPoolB { + header "MethodPoolB.h" + + explicit module Sub2 { + header "MethodPoolBSub2.h" + } + + explicit module Sub { + header "MethodPoolBSub.h" + } +} +module import_decl { + header "import-decl.h" +} + +framework module * { + exclude NotAModule +} + +module linkage_merge_left { + explicit module sub { + header "linkage-merge-sub.h" + } +} + +module autolink { + header "autolink.h" + link "autolink" + + explicit module sub { + header "autolink-sub.h" + link "autolink_sub" + } + + explicit module sub2 { + header "autolink-sub2.h" + link framework "autolink_framework" + } + + explicit module sub3 { + header "autolink-sub3.h" + link "autolink_from_pch" + } +} + +module weird_objc { + header "weird_objc.h" +} + +module ignored_macros { + header "ignored_macros.h" +} + +module cxx_many_overloads { + header "cxx-many-overloads.h" +} + +module cxx_inline_namespace { + header "cxx-inline-namespace.h" +} + +module cxx_inline_namespace_b { + header "cxx-inline-namespace-b.h" +} + +module cxx_linkage_cache { + header "cxx-linkage-cache.h" +} + +module cxx_templates_common { + header "cxx-templates-common.h" +} + +module cxx_templates_a { + header "cxx-templates-a.h" +} + +module cxx_templates_b_impl { + header "cxx-templates-b-impl.h" +} + +module cxx_templates_b { + header "cxx-templates-b.h" +} + +module cxx_templates_c { + header "cxx-templates-c.h" +} + +module cxx_decls { + module unimported { + header "cxx-decls-unimported.h" + } + module imported { + header "cxx-decls-imported.h" + } +} + +module config { + header "config.h" + config_macros [exhaustive] WANT_FOO, WANT_BAR +} + +module diag_pragma { + header "diag_pragma.h" +} + +module dummy { + header "dummy.h" +} + +module builtin { + header "builtin.h" + explicit module sub { + header "builtin_sub.h" + } +} + +module linkage_merge { + explicit module foo { + header "linkage-merge-foo.h" + } + explicit module bar { + header "linkage-merge-bar.h" + } + +} + +module incomplete_mod { + header "incomplete_mod.h" +} + +module warning { + header "warning.h" +} + +module initializer_list { + header "initializer_list" +} + +module using_decl { + module a { header "using-decl-a.h" export * } + module b { header "using-decl-b.h" export * } +} + +module recursive_visibility_a1 { + module inner { header "recursive_visibility_a1_inner.h" } +} +module recursive_visibility_a2 { + module inner { + module more_inner { + header "recursive_visibility_a2_more_inner.h" + } + } +} +module recursive_visibility_b { + header "recursive_visibility_b.h" + export * +} +module recursive_visibility_c { + header "recursive_visibility_c.h" +} +module recursive1 { + header "recursive1.h" +} +module recursive2 { + header "recursive2.h" +} diff --git a/test/ARCMT/migrate-on-pch-and-module.m b/test/ARCMT/migrate-on-pch-and-module.m index 59cae3c03a..c98ce467f6 100644 --- a/test/ARCMT/migrate-on-pch-and-module.m +++ b/test/ARCMT/migrate-on-pch-and-module.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t-mcp -// RUN: %clang_cc1 -objcmt-migrate-subscripting -emit-pch -o %t.pch %s -isysroot %S/../Modules/Inputs/System -triple x86_64-apple-darwin10 -F %S/../Modules/Inputs -fmodules -fmodules-cache-path=%t-mcp -w -// RUN: %clang_cc1 -objcmt-migrate-subscripting -include-pch %t.pch %s -migrate -o %t.remap -isysroot %S/../Modules/Inputs/System -triple x86_64-apple-darwin10 -F %S/../Modules/Inputs -fmodules -fmodules-cache-path=%t-mcp +// RUN: %clang_cc1 -objcmt-migrate-subscripting -emit-pch -o %t.pch %s -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -F %S/Inputs -fmodules -fmodules-cache-path=%t-mcp -w +// RUN: %clang_cc1 -objcmt-migrate-subscripting -include-pch %t.pch %s -migrate -o %t.remap -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -F %S/Inputs -fmodules -fmodules-cache-path=%t-mcp #ifndef HEADER #define HEADER