summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/load_failure.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
commitda82e703d1d9e39fd5acdf18e06855e452c87984 (patch)
treec148834214171b1c8467de34396e2601d68d646a /clang/test/Modules/load_failure.c
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/load_failure.c')
-rw-r--r--clang/test/Modules/load_failure.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/test/Modules/load_failure.c b/clang/test/Modules/load_failure.c
index e278eb5aff8..bc0b4263159 100644
--- a/clang/test/Modules/load_failure.c
+++ b/clang/test/Modules/load_failure.c
@@ -1,20 +1,21 @@
#ifdef NONEXISTENT
-__import_module__ load_nonexistent;
+@import load_nonexistent;
#endif
#ifdef FAILURE
-__import_module__ load_failure;
+@import load_failure;
#endif
// RUN: rm -rf %t
-// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
-// CHECK-NONEXISTENT: load_failure.c:2:19: fatal error: module 'load_nonexistent' not found
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
+// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
-// RUN: not %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash %s -DFAILURE 2> %t.out
+// RUN: not %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -fdisable-module-hash %s -DFAILURE 2> %t.out
// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
// FIXME: Clean up diagnostic text below and give it a location
// CHECK-FAILURE: error: C99 was disabled in PCH file but is currently enabled
+// FIXME: When we have a syntax for modules in C, use that.
OpenPOWER on IntegriCloud