diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-06 18:35:21 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-06 18:35:21 +0000 |
commit | 0cb2626cb56ec10c82dc76b241b1cd035951847c (patch) | |
tree | bf6e5c21aba39992b91b1fce0fa875c34b37db41 /test/CodeGenCXX/debug-info-enum.cpp | |
parent | 83bc50acb4b504f9a0c33d83db543fb42c5166a8 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-enum.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-enum.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/debug-info-enum.cpp b/test/CodeGenCXX/debug-info-enum.cpp index 7e02edef5a..810c3ee7ae 100644 --- a/test/CodeGenCXX/debug-info-enum.cpp +++ b/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 }; +}; +} |