diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-03 19:32:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-03 19:32:59 +0000 |
commit | c13a34b690d2dc2a03c2fea75a0a1438636c19ce (patch) | |
tree | 20cdb1b697928adbdefe4435eff3f584e4df85df /test/Modules/module-private.cpp | |
parent | f84d560fc73c9177af9081a0edf6726e43ec3a63 (diff) |
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
Diffstat (limited to 'test/Modules/module-private.cpp')
-rw-r--r-- | test/Modules/module-private.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/Modules/module-private.cpp b/test/Modules/module-private.cpp index bdfa2682ce..e972ce2891 100644 --- a/test/Modules/module-private.cpp +++ b/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 |