Axel Naumann | 63469422c | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -verify %s -Wno-objc-root-class |
Axel Naumann | d9a25b3 | 2012-10-02 12:18:46 +0000 | [diff] [blame^] | 3 | // RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | grep Emit | FileCheck %s |
Axel Naumann | 63469422c | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 4 | |
| 5 | @__experimental_modules_import templates_left; |
| 6 | @__experimental_modules_import templates_right; |
| 7 | |
| 8 | |
| 9 | void testTemplateClasses() { |
| 10 | Vector<int> vec_int; |
| 11 | vec_int.push_back(0); |
| 12 | |
| 13 | List<bool> list_bool; |
| 14 | list_bool.push_back(false); |
| 15 | |
| 16 | N::Set<char> set_char; |
| 17 | set_char.insert('A'); |
| 18 | } |
| 19 | |
| 20 | void testPendingInstantiations() { |
Axel Naumann | d9a25b3 | 2012-10-02 12:18:46 +0000 | [diff] [blame^] | 21 | // CHECK: call {{.*pendingInstantiationEmit}} |
| 22 | // CHECK: call {{.*pendingInstantiationEmit}} |
| 23 | // CHECK: define {{.*pendingInstantiationEmit.*[(]i}} |
| 24 | // CHECK: define {{.*pendingInstantiationEmit.*[(]double}} |
Axel Naumann | 63469422c | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 25 | triggerPendingInstantiation(); |
| 26 | triggerPendingInstantiationToo(); |
| 27 | } |
Axel Naumann | d9a25b3 | 2012-10-02 12:18:46 +0000 | [diff] [blame^] | 28 | |
| 29 | void testRedeclDefinition() { |
| 30 | // CHECK: define {{.*redeclDefinitionEmit}} |
| 31 | redeclDefinitionEmit(); |
| 32 | } |
| 33 | |
| 34 | // CHECK: call {{.*pendingInstantiation}} |
| 35 | // CHECK: call {{.*redeclDefinitionEmit}} |