[PATCH] D21232: Add attribute noreturn to functions that throw

Aditya Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 11:13:20 PDT 2016


hiraditya updated this revision to Diff 69407.
hiraditya added a comment.

Rebased against master after https://reviews.llvm.org/D23855


https://reviews.llvm.org/D21232

Files:
  libcxx/include/__locale
  libcxx/include/system_error

Index: libcxx/include/system_error
===================================================================
--- libcxx/include/system_error
+++ libcxx/include/system_error
@@ -635,7 +635,8 @@
     static string __init(const error_code&, string);
 };
 
-_LIBCPP_FUNC_VIS void __throw_system_error(int ev, const char* what_arg);
+_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
+void __throw_system_error(int ev, const char* what_arg);
 
 _LIBCPP_END_NAMESPACE_STD
 
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -1183,6 +1183,8 @@
 _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>)
 _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>)
 
+_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
+
 template <size_t _Np>
 struct __narrow_to_utf8
 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21232.69407.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160826/a31e8dcc/attachment.bin>


More information about the llvm-commits mailing list