minix/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-union.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

16 lines
450 B
C++

// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
union E {
int a;
float b;
int bb() { return a;}
float aa() { return b;}
E() { a = 0; }
};
E e;
// CHECK: {{.*}} ; [ DW_TAG_union_type ] [E] [line 3, size 32, align 32, offset 0]
// CHECK: {{.*}} ; [ DW_TAG_subprogram ] [line 6] [bb]
// CHECK: {{.*}} ; [ DW_TAG_subprogram ] [line 7] [aa]
// CHECK: {{.*}} ; [ DW_TAG_subprogram ] [line 8] [E]