Files
clang-p2996/clang/test/CodeGenCXX/debug-info-union.cpp
David Blaikie 86eac722f9 Simplify/generalize some debug info test cases
Mostly, try to depend on the annotation comments more so these tests are more
legible, brief, and agnostic to schema changes in the future (sure, they're not
agnostic to changes to the comment annotations but since they're easier to read
they should be easier to update if that happens).

llvm-svn: 177457
2013-03-19 23:10:14 +00:00

17 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]