Fix the JIT failures from last night.
[oota-llvm.git] / test / C++Frontend / 2004-09-27-DidntEmitTemplate.cpp.tr
1 // RUN: llvmgcc -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | not grep declare
2
3 // This is a testcase for LLVM PR445, which was a problem where the 
4 // instantiation of callDefaultCtor was not being emitted correctly.
5
6 struct Pass {};
7
8 template<typename PassName>
9 Pass *callDefaultCtor() { return new Pass(); }
10
11 void foo(Pass *(*C)());
12
13 struct basic_string {
14   bool empty() const { return true; }
15 };
16
17
18 bool foo2(basic_string &X) {
19   return X.empty();
20 }
21 void baz() { foo(callDefaultCtor<Pass>); }
22