Eliminate the uglified keyword __import_module__ for importing
modules. This leaves us without an explicit syntax for importing
modules in C/C++, because such a syntax needs to be discussed
first. In Objective-C/Objective-C++, the @import syntax is used to
import modules.
Note that, under -fmodules, C/C++ programs can import modules via the
#include mechanism when a module map is in place for that header. This
allows us to work with modules in C/C++ without committing to a syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/submodules-preprocess.cpp b/test/Modules/submodules-preprocess.cpp
index b819d40..7d218b1 100644
--- a/test/Modules/submodules-preprocess.cpp
+++ b/test/Modules/submodules-preprocess.cpp
@@ -1,7 +1,8 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -Eonly -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify
+// RUN: %clang_cc1 -fmodules -x objective-c++ -Eonly -fmodule-cache-path %t -I %S/Inputs/submodules %s -verify
+// FIXME: When we have a syntax for modules in C++, use that.
-__import_module__ std.vector;
+@import std.vector;
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
@@ -15,7 +16,7 @@
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-__import_module__ std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
+@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
@@ -29,9 +30,9 @@
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-__import_module__ std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
+@import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
-__import_module__ std; // import everything in 'std'
+@import std; // import everything in 'std'
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
@@ -45,7 +46,7 @@
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-__import_module__ std.hash_map;
+@import std.hash_map;
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)