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