• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
2 
3 template<class T>
destroy(T * p)4 void destroy(T *p) {
5   p->~T();
6 }
7 
f()8 extern "C" void f() {
9   int a;
10   destroy((void*)&a);
11 }
12 
13 // CHECK-LABEL: define void @f()
14 // CHECK: call void @"\01??$destroy@X@@YAXPAX@Z"
15 // CHECK: ret void
16 
17 // CHECK-LABEL: define linkonce_odr void @"\01??$destroy@X@@YAXPAX@Z"(i8* %p)
18 //    The pseudo-dtor expr should not generate calls to anything.
19 // CHECK-NOT: call
20 // CHECK-NOT: invoke
21 // CHECK: ret void
22