]> granicus.if.org Git - clang/commitdiff
Switch some more of the modules tests over to "-emit-module-from-map",
authorDouglas Gregor <dgregor@apple.com>
Wed, 16 Nov 2011 00:21:54 +0000 (00:21 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 16 Nov 2011 00:21:54 +0000 (00:21 +0000)
and remove stray fprintf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144742 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/FrontendActions.cpp
test/Modules/Inputs/irgen.h [new file with mode: 0644]
test/Modules/Inputs/module.map
test/Modules/irgen.c
test/Modules/lookup.cpp
test/Modules/lookup.m

index aea233b313335fbe1cf67d1a419e60a1d221bfda..243f5277ab1fa4e2b234240492334ba3ac71033c 100644 (file)
@@ -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 (file)
index 0000000..9936bf6
--- /dev/null
@@ -0,0 +1 @@
+static inline int triple(int x) { return x * 3; }
index 6737ee31a721a419b8939ba70041255965968ea8..67a90ccaade1df2bad6f3065277ba1c65020c612 100644 (file)
@@ -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" }
index 0debf05f59349b331e682004b4d7579bb8316fcc..6479f06b2696442128e75f190f61653565c77253 100644 (file)
@@ -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
index d3245f2935f9134d6d4d4d2045cd9a9d650fdd92..30177dc73c1c97515ddb9fc4cfd90b44f293273d 100644 (file)
@@ -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 *);
index d45f93661b9ac2ccaf12e8d6ad084e0acd91a4fd..ff2df9807f63c349912dd25cd8a895025ffec26a 100644 (file)
@@ -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