// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix CODE-LP64 %s
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix CODE-LP32 %s
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix GLOBAL-LP64 %s
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix GLOBAL-LP32 %s
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=armv7-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
// MIPS uses the same representation of method pointers as ARM.
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=mips-unknown-linux-gnu | FileCheck -check-prefix GLOBAL-ARM %s
// WebAssembly uses the same representation of method pointers as ARM.
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=wasm32-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
;
;
;
void ;
void ;
void ;
void ;
// GLOBAL-LP64: @pa2 ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 0 }, align 8
void = &A::f;
// GLOBAL-LP64: @pa3 ={{.*}} global { i64, i64 } { i64 1, i64 0 }, align 8
// GLOBAL-LP32: @pa3 ={{.*}} global { i32, i32 } { i32 1, i32 0 }, align 4
void = &A::vf1;
// GLOBAL-LP64: @pa4 ={{.*}} global { i64, i64 } { i64 9, i64 0 }, align 8
// GLOBAL-LP32: @pa4 ={{.*}} global { i32, i32 } { i32 5, i32 0 }, align 4
void = &A::vf2;
// GLOBAL-LP64: @pc2 ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 16 }, align 8
void = &C::f;
// GLOBAL-LP64: @pc3 ={{.*}} global { i64, i64 } { i64 1, i64 0 }, align 8
void = &A::vf1;
void
void
void
bool
// PR5177
// PR5138
// PR5593
// PR5940
// PR6258
// PR7027
// rdar://problem/10815683 - Verify that we can emit reinterprets of
// member pointers as constant initializers. For added trickiness,
// we also add some non-trivial adjustments.