[cfe-commits] r164593 - in /cfe/trunk: lib/AST/ItaniumMangle.cpp test/CodeGenCXX/mangle-exprs.cpp
John McCall
rjmccall at apple.com
Tue Sep 25 02:10:17 PDT 2012
Author: rjmccall
Date: Tue Sep 25 04:10:17 2012
New Revision: 164593
URL: http://llvm.org/viewvc/llvm-project?rev=164593&view=rev
Log:
Implement Mike Herrick's proposed noexcept mangling.
Modified:
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/test/CodeGenCXX/mangle-exprs.cpp
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=164593&r1=164592&r2=164593&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Tue Sep 25 04:10:17 2012
@@ -2412,7 +2412,6 @@
case Expr::ExpressionTraitExprClass:
case Expr::VAArgExprClass:
case Expr::CXXUuidofExprClass:
- case Expr::CXXNoexceptExprClass:
case Expr::CUDAKernelCallExprClass:
case Expr::AsTypeExprClass:
case Expr::PseudoObjectExprClass:
@@ -2604,6 +2603,11 @@
Out <<"_E";
break;
+ case Expr::CXXNoexceptExprClass:
+ Out << "nx";
+ mangleExpression(cast<CXXNoexceptExpr>(E)->getOperand());
+ break;
+
case Expr::UnaryExprOrTypeTraitExprClass: {
const UnaryExprOrTypeTraitExpr *SAE = cast<UnaryExprOrTypeTraitExpr>(E);
Modified: cfe/trunk/test/CodeGenCXX/mangle-exprs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-exprs.cpp?rev=164593&r1=164592&r2=164593&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-exprs.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-exprs.cpp Tue Sep 25 04:10:17 2012
@@ -190,4 +190,11 @@
// CHECK: void @_ZN5test43tf3INS_1XEEEvDTnw_T_ilLi1EEE
template void tf3<X>(X*);
+
+}
+
+namespace test5 {
+ template <typename T> void a(decltype(noexcept(T()))) {}
+ template void a<int>(decltype(noexcept(int())));
+ // CHECK: void @_ZN5test51aIiEEvDTnxcvT__EE(
}
More information about the cfe-commits
mailing list