Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: cd %S |
| 3 | // |
| 4 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 5 | // RUN: -I Inputs/stress1 \ |
| 6 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 7 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 8 | // RUN: -emit-module -fmodule-name=m00 -o %t/m00.pcm \ |
| 9 | // RUN: Inputs/stress1/module.modulemap |
| 10 | // |
| 11 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 12 | // RUN: -I Inputs/stress1 \ |
| 13 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 14 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 15 | // RUN: -emit-module -fmodule-name=m00 -o %t/m00_check.pcm \ |
| 16 | // RUN: Inputs/stress1/module.modulemap |
| 17 | // |
| 18 | // RUN: diff %t/m00.pcm %t/m00_check.pcm |
| 19 | // |
| 20 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 -fdelayed-template-parsing \ |
| 21 | // RUN: -I Inputs/stress1 \ |
| 22 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 23 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 24 | // RUN: -emit-module -fmodule-name=m01 -o %t/m01.pcm \ |
| 25 | // RUN: Inputs/stress1/module.modulemap |
| 26 | // |
| 27 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 -fdelayed-template-parsing \ |
| 28 | // RUN: -I Inputs/stress1 \ |
| 29 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 30 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 31 | // RUN: -emit-module -fmodule-name=m01 -o %t/m01_check.pcm \ |
| 32 | // RUN: Inputs/stress1/module.modulemap |
| 33 | // |
| 34 | // RUN: diff %t/m01.pcm %t/m01_check.pcm |
| 35 | // |
| 36 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 37 | // RUN: -I Inputs/stress1 \ |
| 38 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 39 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 40 | // RUN: -emit-module -fmodule-name=m02 -o %t/m02.pcm \ |
| 41 | // RUN: Inputs/stress1/module.modulemap |
| 42 | // |
| 43 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 44 | // RUN: -I Inputs/stress1 \ |
| 45 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 46 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 47 | // RUN: -emit-module -fmodule-name=m03 -o %t/m03.pcm \ |
| 48 | // RUN: Inputs/stress1/module.modulemap |
| 49 | // |
| 50 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 51 | // RUN: -I Inputs/stress1 \ |
| 52 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 53 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 54 | // RUN: -fmodule-file=%t/m00.pcm \ |
| 55 | // RUN: -fmodule-file=%t/m01.pcm \ |
| 56 | // RUN: -fmodule-file=%t/m02.pcm \ |
| 57 | // RUN: -fmodule-file=%t/m03.pcm \ |
| 58 | // RUN: -emit-module -fmodule-name=merge00 -o %t/merge00.pcm \ |
| 59 | // RUN: Inputs/stress1/module.modulemap |
| 60 | // |
| 61 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 62 | // RUN: -I Inputs/stress1 \ |
| 63 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 64 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 65 | // RUN: -fmodule-file=%t/m00.pcm \ |
| 66 | // RUN: -fmodule-file=%t/m01.pcm \ |
| 67 | // RUN: -fmodule-file=%t/m02.pcm \ |
| 68 | // RUN: -fmodule-file=%t/m03.pcm \ |
| 69 | // RUN: -emit-module -fmodule-name=merge00 -o %t/merge00_check.pcm \ |
| 70 | // RUN: Inputs/stress1/module.modulemap |
| 71 | // |
| 72 | // RUN: diff %t/merge00.pcm %t/merge00_check.pcm |
| 73 | // |
| 74 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 75 | // RUN: -I Inputs/stress1 \ |
| 76 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 77 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 78 | // RUN: -fmodule-map-file=Inputs/stress1/module.modulemap \ |
| 79 | // RUN: -fmodule-file=%t/m00.pcm \ |
| 80 | // RUN: -fmodule-file=%t/m01.pcm \ |
| 81 | // RUN: -fmodule-file=%t/m02.pcm \ |
| 82 | // RUN: -fmodule-file=%t/m03.pcm \ |
| 83 | // RUN: -fmodule-file=%t/merge00.pcm \ |
| 84 | // RUN: -verify stress1.cpp -S -emit-llvm -o %t/stress1.ll |
| 85 | // |
| 86 | // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ |
| 87 | // RUN: -I Inputs/stress1 \ |
| 88 | // RUN: -fno-implicit-modules -fno-modules-implicit-maps \ |
| 89 | // RUN: -fmodule-map-file-home-is-cwd \ |
| 90 | // RUN: -fmodule-map-file=Inputs/stress1/module.modulemap \ |
| 91 | // RUN: -fmodule-file=%t/m00.pcm \ |
| 92 | // RUN: -fmodule-file=%t/m01.pcm \ |
| 93 | // RUN: -fmodule-file=%t/m02.pcm \ |
| 94 | // RUN: -fmodule-file=%t/m03.pcm \ |
| 95 | // RUN: -fmodule-file=%t/merge00.pcm \ |
| 96 | // RUN: -verify stress1.cpp -S -emit-llvm -o %t/stress1_check.ll |
| 97 | // |
| 98 | // RUN: diff -u %t/stress1.ll %t/stress1_check.ll |
| 99 | // |
| 100 | // expected-no-diagnostics |
| 101 | |
| 102 | #include "m00.h" |
| 103 | #include "m01.h" |
| 104 | #include "m02.h" |
| 105 | #include "m03.h" |
| 106 | |
| 107 | #include "merge00.h" |
| 108 | |
| 109 | int f() { return N01::S00('a').method00('b') + (int)N00::S00(42) + function00(42) + g(); } |
| 110 | |
| 111 | int f2() { |
| 112 | return pragma_weak00() + pragma_weak01() + pragma_weak02() + |
| 113 | pragma_weak03 + pragma_weak04 + pragma_weak05; |
| 114 | } |