diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-06 07:33:30 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-06 07:33:30 +0000 |
commit | 57407525fdc4fd5aab719aa0bb473d29517d8c47 (patch) | |
tree | 24c26f5708da8a54831358317823b45866efdb8b /clang/test/CodeGen/debug-info-enum.c | |
parent | 646f64f04ac5e70be4e49e35aaf7fc067ca38723 (diff) | |
download | bcm5719-llvm-57407525fdc4fd5aab719aa0bb473d29517d8c47.tar.gz bcm5719-llvm-57407525fdc4fd5aab719aa0bb473d29517d8c47.zip |
DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use.
This regressed a little further 208055 though it was already a little
broken.
While the requiresCompleteType optimization should be implemented here.
Future (possibly near future) work.
llvm-svn: 208065
Diffstat (limited to 'clang/test/CodeGen/debug-info-enum.c')
-rw-r--r-- | clang/test/CodeGen/debug-info-enum.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-enum.c b/clang/test/CodeGen/debug-info-enum.c new file mode 100644 index 00000000000..acf3f524088 --- /dev/null +++ b/clang/test/CodeGen/debug-info-enum.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s + +// CHECK: metadata [[TEST3_ENUMS:![0-9]*]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e] +// CHECK: [[TEST3_ENUMS]] = metadata !{metadata [[TEST3_E:![0-9]*]]} +// CHECK: [[TEST3_E]] = {{.*}}, metadata !"E", i64 -1} ; [ DW_TAG_enumerator ] [E :: -1] + +enum e; +void func(enum e *p) { +} +enum e { E = -1 }; |