r292632 - Fix actually-reachable llvm_unreachable.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 20 10:50:13 PST 2017
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); }
+}
More information about the cfe-commits
mailing list