// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
// CHECK: @_ZZ1hvE1i = internal global i32 0, align 4
// CHECK: @base_req ={{.*}} global [4 x i8] c"foo\00", align 1
// CHECK: @base_req_uchar ={{.*}} global [4 x i8] c"bar\00", align 1
// CHECK: @_ZZN5test31BC1EvE1u = internal global { i8, [3 x i8] } { i8 97, [3 x i8] undef }, align 4
// CHECK: @_ZZ2h2vE1i = linkonce_odr global i32 0, comdat, align 4
// CHECK: @_ZGVZ2h2vE1i = linkonce_odr global i64 0, comdat, align 8{{$}}
// CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16
// CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer, comdat, align 8
// CHECK11: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global { i8** } { i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5test49HasVTableE, i32 0, inrange i32 0, i32 2) }, comdat, align 8
;
void
void
int ;
void
// CHECK: define linkonce_odr void @_Z2h2v() {{.*}} comdat {
inline void
void
// PR6980: this shouldn't crash
// Make sure we emit the initializer correctly for the following:
char base_req = ;
unsigned char base_req_uchar = ;
// rdar://problem/11091093
// Static variables should be consistent across constructor
// or destructor variants.
// This shouldn't error out.
// We forgot to set the comdat when replacing the global with a different type.