// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -fblocks %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
extern "C" int sink;
extern "C" const volatile void* volatile ptr_sink = nullptr;
;
;
;
;
constexpr int
int
int
int
// CHECK: @global_one ={{.*}} global i32 [[@LINE+1]], align 4
int global_one = ;
// CHECK-NEXT: @global_two ={{.*}} global i32 [[@LINE+1]], align 4
int global_two = ;
// CHECK: @_ZL12global_three = internal constant i32 [[@LINE+1]], align 4
const int ;
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: %call = call noundef i32 @_Z21get_line_nonconstexpri(i32 noundef [[@LINE+2]])
// CHECK-NEXT: store i32 %call, i32* @global_four, align 4
int global_four = ;
;
// CHECK-LABEL: define{{.*}} void @_ZN11InClassInit10test_classEv()
void
// CHECK-LABEL: define{{.*}} void @_ZN11InClassInitC2Ev
// CHECK: store i32 [[@LINE+4]], i32* %Init, align 4
// CHECK: %call = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+3]])
// CHECK-NEXT: %call2 = call noundef i32 @_Z9get_line2i(i32 noundef %call)
// CHECK-NEXT: store i32 %call2, i32* %Init2, align 4
;
:
// CHECK-LABEL: define{{.*}} void @_ZN11InClassInitC2E4Tag4i(%struct.InClassInit* {{[^,]*}} %this, i32 noundef %arg)
// CHECK: %[[TEMP:.+]] = load i32, i32* %arg.addr, align 4
// CHECK-NEXT: store i32 %[[TEMP]], i32* %Init, align 4
// CHECK: %[[CALL:.+]] = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+3]])
// CHECK-NEXT: %[[CALL2:.+]] = call noundef i32 @_Z9get_line2i(i32 noundef %[[CALL]])
// CHECK-NEXT: store i32 %[[CALL2]], i32* %Init2, align 4
:
// CHECK-LABEL: define{{.*}} void @_Z13get_line_testv()
void
void