summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-enum.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-06 18:35:21 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-06 18:35:21 +0000
commit483a9da5986f8afb737a751de6145a1f4bd9849b (patch)
tree9f674d453e599d58c656f1c8b818eb3cab854e53 /clang/test/CodeGenCXX/debug-info-enum.cpp
parentd9769417042fbc604271eedd1b22a6770203559f (diff)
downloadbcm5719-llvm-483a9da5986f8afb737a751de6145a1f4bd9849b.tar.gz
bcm5719-llvm-483a9da5986f8afb737a751de6145a1f4bd9849b.zip
Reapply: DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use.
Reverting r208106 to reapply r208065 with a fix for the regression. The issue was that the enum tried to be built even if the declaration hadn't been constructed for debug info - presenting problems for enum templates and typedefs of enums with names for linkage purposes. Original commit message: 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: 208114
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-enum.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-enum.cpp b/clang/test/CodeGenCXX/debug-info-enum.cpp
index 7e02edef5a7..810c3ee7ae9 100644
--- a/clang/test/CodeGenCXX/debug-info-enum.cpp
+++ b/clang/test/CodeGenCXX/debug-info-enum.cpp
@@ -34,3 +34,12 @@ void func() {
e x;
}
}
+
+namespace test4 {
+// Don't try to build debug info for a dependent enum.
+// CHECK-NOT: test4
+template <typename T>
+struct S {
+ enum e { E = T::v };
+};
+}
OpenPOWER on IntegriCloud