summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/module-private.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-03 19:32:59 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-03 19:32:59 +0000
commitda82e703d1d9e39fd5acdf18e06855e452c87984 (patch)
treec148834214171b1c8467de34396e2601d68d646a /clang/test/Modules/module-private.cpp
parentc2f91c37e83a54c649582120827a25862a10f312 (diff)
downloadbcm5719-llvm-da82e703d1d9e39fd5acdf18e06855e452c87984.tar.gz
bcm5719-llvm-da82e703d1d9e39fd5acdf18e06855e452c87984.zip
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. llvm-svn: 147467
Diffstat (limited to 'clang/test/Modules/module-private.cpp')
-rw-r--r--clang/test/Modules/module-private.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/test/Modules/module-private.cpp b/clang/test/Modules/module-private.cpp
index bdfa2682ce1..e972ce2891c 100644
--- a/clang/test/Modules/module-private.cpp
+++ b/clang/test/Modules/module-private.cpp
@@ -1,10 +1,11 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_left -x c++ -emit-module %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_right -x c++ -emit-module %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -fmodule-name=module_private_left -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -fmodule-name=module_private_right -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t %s -verify
+// FIXME: When we have a syntax for modules in C++, use that.
-__import_module__ module_private_left;
-__import_module__ module_private_right;
+@import module_private_left;
+@import module_private_right;
void test() {
int &ir = f0(1.0); // okay: f0() from 'right' is not visible
OpenPOWER on IntegriCloud