// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -Wno-strict-prototypes -fcf-protection=branch -triple i386-linux-gnu %s -o - | FileCheck %s
// CHECK: @t5 = weak{{.*}} global i32 2
int t5 = 2;
// CHECK: @t13 ={{.*}} global %struct.s0 zeroinitializer, section "SECT"
;
struct s0 t13 = ;
// CHECK: @t14.x = internal global i32 0, section "SECT"
void
// CHECK: @t18 ={{.*}} global i32 1, align 4
extern int t18 ;
int t18 = 1;
// CHECK: @t16 = extern_weak global i32
extern int t16 ;
// CHECK: @t6 = protected global i32 0
int t6 ;
// CHECK: @t12 ={{.*}} global i32 0, section "SECT"
int t12 ;
// CHECK: @t9 = weak{{.*}} alias void (...), bitcast (void ()* @__t8 to void (...)*)
void
void ;
// CHECK: declare extern_weak i32 @t15()
int ;
int
// CHECK: define{{.*}} void @t1() [[NR:#[0-9]+]] {
void ;
void
// CHECK: define{{.*}} void @t2() [[NUW:#[0-9]+]] {
void ;
void
// CHECK: define weak{{.*}} void @t3() [[NUW]] {
void ;
void
// CHECK: define hidden void @t4() [[NUW]] {
void ;
void
// CHECK: define{{.*}} void @t7() [[NR]] {
void ;
void
// CHECK: define{{.*}} void @t72() [[COLDDEF:#[0-9]+]] {
void ;
void ;
void
// CHECK: call void @t71() [[COLDSITE:#[0-9]+]]
// CHECK: declare void @t71() [[COLDDECL:#[0-9]+]]
// CHECK: define{{.*}} void @t82() [[HOTDEF:#[0-9]+]] {
void ;
void ;
void
// CHECK: call void @t81() [[HOTSITE:#[0-9]+]]
// CHECK: declare void @t81() [[HOTDECL:#[0-9]+]]
// CHECK: define{{.*}} void @t10() [[NUW]] section "xSECT" {
void ;
void
// CHECK: define{{.*}} void @t11() [[NUW]] section "xSECT" {
void
// CHECK: define{{.*}} i32 @t19() [[NUW]] {
extern int ;
int
// CHECK:define{{.*}} void @t20() [[NUW]] {
// CHECK: call void @abort()
// CHECK-NEXT: unreachable
void
;
void
// CHECK: [[FPTRVAR:%[a-z0-9]+]] = load void (i32)*, void (i32)** @fptr
// CHECK-NEXT: call x86_fastcallcc void [[FPTRVAR]](i32 inreg noundef 10)
// PR9356: We might want to err on this, but for now at least make sure we
// use the section in the definition.
void ;
void
// CHECK: define{{.*}} void @t22() [[NUW]] section ".bar"
// CHECK: define{{.*}} void @t23() [[NOCF_CHECK_FUNC:#[0-9]+]]
void
// CHECK: call void %{{[a-z0-9]+}}() [[NOCF_CHECK_CALL:#[0-9]+]]
typedef void ;
void
// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
// CHECK: attributes [[NR]] = { noinline noreturn nounwind{{.*}} }
// CHECK: attributes [[COLDDEF]] = { cold {{.*}}}
// CHECK: attributes [[COLDDECL]] = { cold {{.*}}}
// CHECK: attributes [[HOTDEF]] = { hot {{.*}}}
// CHECK: attributes [[HOTDECL]] = { hot {{.*}}}
// CHECK: attributes [[NOCF_CHECK_FUNC]] = { nocf_check {{.*}}}
// CHECK: attributes [[COLDSITE]] = { cold {{.*}}}
// CHECK: attributes [[HOTSITE]] = { hot {{.*}}}
// CHECK: attributes [[NOCF_CHECK_CALL]] = { nocf_check }