2012-10-02 17:09:43 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -verify %s -Wno-objc-root-class
|
2012-10-02 20:18:46 +08:00
|
|
|
// 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
|
2012-10-02 17:09:43 +08:00
|
|
|
|
|
|
|
@__experimental_modules_import templates_left;
|
|
|
|
@__experimental_modules_import templates_right;
|
|
|
|
|
|
|
|
|
|
|
|
void testTemplateClasses() {
|
|
|
|
Vector<int> vec_int;
|
|
|
|
vec_int.push_back(0);
|
|
|
|
|
|
|
|
List<bool> list_bool;
|
|
|
|
list_bool.push_back(false);
|
|
|
|
|
|
|
|
N::Set<char> set_char;
|
|
|
|
set_char.insert('A');
|
|
|
|
}
|
|
|
|
|
|
|
|
void testPendingInstantiations() {
|
2012-10-02 20:18:46 +08:00
|
|
|
// CHECK: call {{.*pendingInstantiationEmit}}
|
|
|
|
// CHECK: call {{.*pendingInstantiationEmit}}
|
|
|
|
// CHECK: define {{.*pendingInstantiationEmit.*[(]i}}
|
|
|
|
// CHECK: define {{.*pendingInstantiationEmit.*[(]double}}
|
2012-10-02 17:09:43 +08:00
|
|
|
triggerPendingInstantiation();
|
|
|
|
triggerPendingInstantiationToo();
|
|
|
|
}
|
2012-10-02 20:18:46 +08:00
|
|
|
|
|
|
|
void testRedeclDefinition() {
|
|
|
|
// CHECK: define {{.*redeclDefinitionEmit}}
|
|
|
|
redeclDefinitionEmit();
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: call {{.*pendingInstantiation}}
|
|
|
|
// CHECK: call {{.*redeclDefinitionEmit}}
|