aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/macros.c
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
commitc13a34b690d2dc2a03c2fea75a0a1438636c19ce (patch)
tree20cdb1b697928adbdefe4435eff3f584e4df85df /test/Modules/macros.c
parentf84d560fc73c9177af9081a0edf6726e43ec3a63 (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/macros.c')
-rw-r--r--test/Modules/macros.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/Modules/macros.c b/test/Modules/macros.c
index 460c482ef9..3fddcc7ff5 100644
--- a/test/Modules/macros.c
+++ b/test/Modules/macros.c
@@ -1,9 +1,10 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -emit-module -fmodule-cache-path %t -fmodule-name=macros %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -verify -fmodule-cache-path %t %s
-// RUN: %clang_cc1 -E -fmodules -fmodule-cache-path %t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-cache-path %t -fmodule-name=macros %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodule-cache-path %t %s
+// RUN: %clang_cc1 -E -fmodules -x objective-c -fmodule-cache-path %t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
+// FIXME: When we have a syntax for modules in C, use that.
-__import_module__ macros;
+@import macros;
#ifndef INTEGER
# error INTEGER macro should be visible