[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / block-in-ctor-dtor.cpp
blob0ec9db1db7283c9d87fc4ed4c46a61c895449461
1 // RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
3 typedef void (^dispatch_block_t)(void);
5 void dispatch_once(dispatch_block_t);
7 class Zone {
8 public:
9 Zone();
10 ~Zone();
13 Zone::Zone() {
14 dispatch_once(^{});
15 dispatch_once(^{});
18 Zone::~Zone() {
19 dispatch_once(^{});
20 dispatch_once(^{});
23 class X : public virtual Zone {
24 X();
25 ~X();
28 X::X() {
29 dispatch_once(^{});
30 dispatch_once(^{});
33 X::~X() {
34 dispatch_once(^{});
35 dispatch_once(^{});
39 // CHECK-LABEL: define internal void @___ZN4ZoneC2Ev_block_invoke
40 // CHECK-LABEL: define internal void @___ZN4ZoneC2Ev_block_invoke_
41 // CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke
42 // CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke_
43 // CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke
44 // CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke_
45 // CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke
46 // CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke_