1 // RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s 2 3 typedef void (^dispatch_block_t)(void); 4 5 void dispatch_once(dispatch_block_t); 6 7 class Zone { 8 public: 9 Zone(); 10 ~Zone(); 11 }; 12 13 Zone::Zone() { 14 dispatch_once(^{}); 15 dispatch_once(^{}); 16 } 17 18 Zone::~Zone() { 19 dispatch_once(^{}); 20 dispatch_once(^{}); 21 } 22 23 class X : public virtual Zone { 24 X(); 25 ~X(); 26 }; 27 28 X::X() { 29 dispatch_once(^{}); 30 dispatch_once(^{}); 31 }; 32 33 X::~X() { 34 dispatch_once(^{}); 35 dispatch_once(^{}); 36 }; 37 38 39 // CHECK: define internal void @___ZN4ZoneC2Ev_block_invoke_ 40 // CHECK: define internal void @___ZN4ZoneC2Ev_block_invoke_ 41 // CHECK: define internal void @___ZN4ZoneD2Ev_block_invoke_ 42 // CHECK: define internal void @___ZN4ZoneD2Ev_block_invoke_ 43 // CHECK: define internal void @___ZN1XC1Ev_block_invoke_ 44 // CHECK: define internal void @___ZN1XC1Ev_block_invoke_ 45 // CHECK: define internal void @___ZN1XC2Ev_block_invoke_ 46 // CHECK: define internal void @___ZN1XC2Ev_block_invoke_ 47 // CHECK: define internal void @___ZN1XD2Ev_block_invoke_ 48 // CHECK: define internal void @___ZN1XD2Ev_block_invoke_ 49