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
--- /dev/null
+static inline int triple(int x) { return x * 3; }
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" }
-// 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) {
}
// CHECK: define internal i32 @triple(i32
-#endif
::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 *);
[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