Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
      2 
      3 template<class T>
      4 void destroy(T *p) {
      5   p->~T();
      6 }
      7 
      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