r292632 - Fix actually-reachable llvm_unreachable.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 23 08:57:28 PST 2017
Should this test that some specific mangling comes out the other end (tests
that amount to "test that this does anything other than crashing" always
make me a bit suspicious that there's /some/ specific behavior that is
intended/should be tested for)
On Fri, Jan 20, 2017 at 11:01 AM Richard Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: rsmith
> Date: Fri Jan 20 12:50:12 2017
> New Revision: 292632
>
> URL: http://llvm.org/viewvc/llvm-project?rev=292632&view=rev
> Log:
> Fix actually-reachable llvm_unreachable.
>
> Modified:
> cfe/trunk/lib/AST/ItaniumMangle.cpp
> cfe/trunk/test/CodeGenCXX/mangle.cpp
>
> Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=292632&r1=292631&r2=292632&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
> +++ cfe/trunk/lib/AST/ItaniumMangle.cpp Fri Jan 20 12:50:12 2017
> @@ -3043,6 +3043,7 @@ void CXXNameMangler::mangleType(const De
> // ::= Te <name> # dependent elaborated type
> specifier using
> // # 'enum'
> switch (T->getKeyword()) {
> + case ETK_None:
> case ETK_Typename:
> break;
> case ETK_Struct:
> @@ -3056,8 +3057,6 @@ void CXXNameMangler::mangleType(const De
> case ETK_Enum:
> Out << "Te";
> break;
> - default:
> - llvm_unreachable("unexpected keyword for dependent type name");
> }
> // Typename types are always nested
> Out << 'N';
>
> Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=292632&r1=292631&r2=292632&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/mangle.cpp Fri Jan 20 12:50:12 2017
> @@ -1125,3 +1125,14 @@ namespace test57 {
> // CHECK-LABEL: @_ZN6test571fILi0EEEvDTplcldtL_ZNS_1xEE1fIXLi0EEEET_E
> template void f<0>(int);
> }
> +
> +namespace test58 {
> + struct State {
> + bool m_fn1();
> + } a;
> + template <class T> struct identity_ { typedef T type; };
> + struct A {
> + template <typename T> A(T, bool (identity_<T>::type::*)());
> + };
> + void fn1() { A(a, &State::m_fn1); }
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170123/ab600758/attachment.html>
More information about the cfe-commits
mailing list