// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=X86,CXX11X86
// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=X86,CXX17X86
// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple amdgcn-amd-amdhsa | FileCheck %s --check-prefixes=AMD,CXX11AMD
// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple amdgcn-amd-amdhsa | FileCheck %s --check-prefixes=AMD,CXX17AMD
;
// X86: @_ZN1A3FooE ={{.*}} constant i32 123, align 4
// AMD: @_ZN1A3FooE ={{.*}} addrspace(1) constant i32 123, align 4
const int *p = &A::Foo; // emit available_externally
const int A::Foo; // convert to full definition
;
;
const int *p_pod = &CreatePOD::pod.g;
;
;
;
// X86: @_ZL15ConstStaticexpr = internal constant i32 46,
// AMD: @_ZL15ConstStaticexpr = internal addrspace(4) constant i32 46,
static constexpr int ConstStaticexpr = 46;
// X86: @_ZL9ConstExpr = internal constant i32 46, align 4
// AMD: @_ZL9ConstExpr = internal addrspace(4) constant i32 46, align 4
static const int ConstExpr = 46;
// X86: @_ZL21ConstexprStaticStruct = internal constant %struct.Bar { i32 47 },
// AMD: @_ZL21ConstexprStaticStruct = internal addrspace(1) constant %struct.Bar { i32 47 },
static constexpr Bar ConstexprStaticStruct = ;
// X86: @_ZL28ConstexprStaticMutableStruct = internal global %struct.MutableBar { i32 48 },
// AMD: @_ZL28ConstexprStaticMutableStruct = internal addrspace(1) global %struct.MutableBar { i32 48 },
static constexpr MutableBar ConstexprStaticMutableStruct = ;
void ;
void