2011-02-04 08:01:24 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
|
|
|
|
|
|
|
|
struct Base {
|
|
|
|
virtual ~Base();
|
|
|
|
} ;
|
|
|
|
|
|
|
|
struct Derived : Base {
|
|
|
|
void operator delete(void *) { }
|
|
|
|
Derived();
|
|
|
|
};
|
|
|
|
|
|
|
|
void foo() {
|
|
|
|
Derived d1; // ok
|
|
|
|
}
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define internal i32 @_Z1fj(
|
2011-02-04 08:01:24 +08:00
|
|
|
inline unsigned f(unsigned n) { return n == 0 ? 0 : n + f(n-1); }
|
|
|
|
|
|
|
|
unsigned g(unsigned n) { return f(n); }
|
|
|
|
|
2011-09-20 02:05:26 +08:00
|
|
|
// rdar://problem/10133200: give explicit instantiations external linkage in kernel mode
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} void @_Z3barIiEvv()
|
2011-09-20 02:05:26 +08:00
|
|
|
template <typename T> void bar() {}
|
|
|
|
template void bar<int>();
|
2011-02-04 08:01:24 +08:00
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define internal i32 @_Z5identIiET_S0_(
|
2011-02-04 08:01:24 +08:00
|
|
|
template <typename X> X ident(X x) { return x; }
|
2011-09-20 02:05:26 +08:00
|
|
|
|
2011-02-04 08:01:24 +08:00
|
|
|
int foo(int n) { return ident(n); }
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define internal void @_ZN7DerivedD1Ev(
|
|
|
|
// CHECK-LABEL: define internal void @_ZN7DerivedD0Ev(
|
|
|
|
// CHECK-LABEL: define internal void @_ZN7DeriveddlEPv(
|