aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Frontend/FrontendActions.cpp2
-rw-r--r--test/Modules/Inputs/irgen.h1
-rw-r--r--test/Modules/Inputs/module.map5
-rw-r--r--test/Modules/irgen.c11
-rw-r--r--test/Modules/lookup.cpp9
-rw-r--r--test/Modules/lookup.m9
6 files changed, 20 insertions, 17 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index aea233b313..243f5277ab 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -165,8 +165,6 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,
if (Module->UmbrellaHeader) {
// FIXME: Deal with explicit submodule headers, which won't be contained
// within the umbrella header.
- fprintf(stderr, "note: using umbrella header \"%s\"\n",
- Module->UmbrellaHeader->getName());
setCurrentFile(Module->UmbrellaHeader->getName(), getCurrentFileKind());
} else {
// FIXME: Deal with the non-umbrella case, where we have to synthesize
diff --git a/test/Modules/Inputs/irgen.h b/test/Modules/Inputs/irgen.h
new file mode 100644
index 0000000000..9936bf62ef
--- /dev/null
+++ b/test/Modules/Inputs/irgen.h
@@ -0,0 +1 @@
+static inline int triple(int x) { return x * 3; }
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map
index 6737ee31a7..67a90ccaad 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -2,3 +2,8 @@ module diamond_top { umbrella "diamond_top.h" }
module diamond_left { umbrella "diamond_left.h" }
module diamond_right { umbrella "diamond_right.h" }
module diamond_bottom { umbrella "diamond_bottom.h" }
+module irgen { umbrella "irgen.h" }
+module lookup_left_objc { umbrella "lookup_left.h" }
+module lookup_right_objc { umbrella "lookup_right.h" }
+module lookup_left_cxx { umbrella "lookup_left.hpp" }
+module lookup_right_cxx { umbrella "lookup_right.hpp" }
diff --git a/test/Modules/irgen.c b/test/Modules/irgen.c
index 0debf05f59..6479f06b26 100644
--- a/test/Modules/irgen.c
+++ b/test/Modules/irgen.c
@@ -1,10 +1,8 @@
-// RUN: %clang_cc1 -emit-module -triple x86_64-apple-darwin10 -o %t/module.pcm -DBUILD_MODULE %s
-// RUN: %clang_cc1 -fmodule-cache-path %t -triple x86_64-apple-darwin10 -fdisable-module-hash -emit-llvm -o - %s | FileCheck %s
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
-#ifdef BUILD_MODULE
-static inline int triple(int x) { return x * 3; }
-#else
-__import_module__ module;
+__import_module__ irgen;
// CHECK: define void @triple_value
void triple_value(int *px) {
@@ -12,4 +10,3 @@ void triple_value(int *px) {
}
// CHECK: define internal i32 @triple(i32
-#endif
diff --git a/test/Modules/lookup.cpp b/test/Modules/lookup.cpp
index d3245f2935..30177dc73c 100644
--- a/test/Modules/lookup.cpp
+++ b/test/Modules/lookup.cpp
@@ -14,10 +14,11 @@ void test(int i, float f) {
::f0(&f);
}
-// RUN: %clang_cc1 -emit-module -x c++ -verify -o %T/lookup_left_cxx.pcm %S/Inputs/lookup_left.hpp
-// RUN: %clang_cc1 -emit-module -x c++ -o %T/lookup_right_cxx.pcm %S/Inputs/lookup_right.hpp
-// RUN: %clang_cc1 -x c++ -fmodule-cache-path %T -fdisable-module-hash %s -verify
-// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %T -fdisable-module-hash %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_left_cxx -x c++ %S/Inputs/module.map -verify
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_right_cxx -x c++ %S/Inputs/module.map -verify
+// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t %s -verify
+// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
// CHECK-PRINT: int *f0(int *);
// CHECK-PRINT: float *f0(float *);
diff --git a/test/Modules/lookup.m b/test/Modules/lookup.m
index d45f93661b..ff2df9807f 100644
--- a/test/Modules/lookup.m
+++ b/test/Modules/lookup.m
@@ -8,10 +8,11 @@ void test(id x) {
[x method]; // expected-warning{{multiple methods named 'method' found}}
}
-// RUN: %clang_cc1 -emit-module -x objective-c -o %T/lookup_left_objc.pcm %S/Inputs/lookup_left.h
-// RUN: %clang_cc1 -emit-module -x objective-c -o %T/lookup_right_objc.pcm %S/Inputs/lookup_right.h
-// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %T -fdisable-module-hash -verify %s
-// RUN: %clang_cc1 -ast-print -x objective-c -fmodule-cache-path %T -fdisable-module-hash %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map
+// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -verify %s
+// RUN: %clang_cc1 -ast-print -x objective-c -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
// CHECK-PRINT: - (int) method;
// CHECK-PRINT: - (double) method