aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/debug-info-enum-class.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-05-23 00:09:47 +0000
committerEric Christopher <echristo@apple.com>2012-05-23 00:09:47 +0000
commita91af14b8d61d070bf9c2935167ebacbeb9f3eee (patch)
tree47de9712e69f09561c15e2208b71209e2a5e01d3 /clang/test/CodeGenCXX/debug-info-enum-class.cpp
parentc49643586b90d8c796851e28616a48bb48c9a0cc (diff)
downloadllvm-a91af14b8d61d070bf9c2935167ebacbeb9f3eee.zip
llvm-a91af14b8d61d070bf9c2935167ebacbeb9f3eee.tar.gz
llvm-a91af14b8d61d070bf9c2935167ebacbeb9f3eee.tar.bz2
Emit C++11 enum class information if it exists.
Part of rdar://11496790 llvm-svn: 157304
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-enum-class.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum-class.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-enum-class.cpp b/clang/test/CodeGenCXX/debug-info-enum-class.cpp
new file mode 100644
index 0000000..e2d4619
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-enum-class.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
+
+enum class A { A1=1 }; // underlying type is int by default
+enum class B: unsigned long { B1=1 }; // underlying type is unsigned long
+enum C { C1 = 1 };
+A a;
+B b;
+C c;
+
+// CHECK: metadata !{i32 {{.*}}, null, metadata !"A", metadata !4, i32 3, i64 32, i64 32, i32 0, i32 0, metadata !5, metadata !6, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+// CHECK: metadata !{i32 {{.*}}, null, metadata !"B", metadata !4, i32 4, i64 64, i64 64, i32 0, i32 0, metadata !9, metadata !10, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]
+// CHECK: metadata !{i32 {{.*}}, null, metadata !"C", metadata !4, i32 5, i64 32, i64 32, i32 0, i32 0, null, metadata !13, i32 0, i32 0} ; [ DW_TAG_enumeration_type ]