// RUN: %clang_cc1 -emit-llvm -triple arm-none-eabi -o - %s | FileCheck %s
// Test interaction between __attribute__((section())) and '#pragma clang
// section' directives. The attribute should always have higher priority than
// the pragma.
// Text tests.
void ;
void
void ;
void
static void ;
static void
static void ;
static void
// Rodata tests.
const int ext_const = 1;
static const int int_const = 1;
// Data tests.
int ext_var = 1;
static int int_var = 1;
// Bss tests.
int ext_zvar;
static int int_zvar;
// CHECK: @ext_const ={{.*}} constant i32 1, section ".ext_const_attr", align 4{{$}}
// CHECK: @int_const = internal constant i32 1, section ".int_const_attr", align 4{{$}}
// CHECK: @ext_var ={{.*}} global i32 1, section ".ext_var_attr", align 4{{$}}
// CHECK: @int_var = internal global i32 1, section ".int_var_attr", align 4{{$}}
// CHECK: @ext_zvar ={{.*}} global i32 0, section ".ext_zvar_attr", align 4{{$}}
// CHECK: @int_zvar = internal global i32 0, section ".int_zvar_attr", align 4{{$}}
// CHECK: define{{.*}} void @ext_fun() #0 section ".ext_fun_attr"
// CHECK: define{{.*}} void @ext_fun2() #0 section ".ext_fun2_attr"
// CHECK: define internal void @int_fun() #0 section ".int_fun_attr"
// CHECK: define internal void @int_fun2() #0 section ".int_fun2_attr"
//
// Function attributes should not include implicit-section-name.
// CHECK-NOT: attributes #0 = {{.*}}implicit-section-name
//
// No other attribute group should be present in the file.
// CHECK-NOT: attributes #1