Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: third_party/libc++abi/src/cxa_handlers.hpp

Issue 75213003: Add libc++ and libc++abi to third-party. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libc++abi/src/cxa_guard.cpp ('k') | third_party/libc++abi/src/cxa_handlers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libc++abi/src/cxa_handlers.hpp
===================================================================
--- third_party/libc++abi/src/cxa_handlers.hpp (revision 0)
+++ third_party/libc++abi/src/cxa_handlers.hpp (revision 0)
@@ -0,0 +1,54 @@
+//===------------------------- cxa_handlers.cpp ---------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//
+// This file implements the functionality associated with the terminate_handler,
+// unexpected_handler, and new_handler.
+//===----------------------------------------------------------------------===//
+
+#ifndef _CXA_HANDLERS_H
+#define _CXA_HANDLERS_H
+
+#include <exception>
+
+namespace std
+{
+
+__attribute__((visibility("hidden"), noreturn))
+void
+__unexpected(unexpected_handler func);
+
+__attribute__((visibility("hidden"), noreturn))
+void
+__terminate(terminate_handler func) _NOEXCEPT;
+
+} // std
+
+extern "C"
+{
+
+extern void (*__cxa_terminate_handler)();
+extern void (*__cxa_unexpected_handler)();
+extern void (*__cxa_new_handler)();
+
+/*
+
+ At some point in the future these three symbols will become
+ C++11 atomic variables:
+
+ extern std::atomic<std::terminate_handler> __cxa_terminate_handler;
+ extern std::atomic<std::unexpected_handler> __cxa_unexpected_handler;
+ extern std::atomic<std::new_handler> __cxa_new_handler;
+
+ This change will not impact their ABI. But it will allow for a
+ portable performance optimization.
+
+*/
+
+} // extern "C"
+
+#endif // _CXA_HANDLERS_H
« no previous file with comments | « third_party/libc++abi/src/cxa_guard.cpp ('k') | third_party/libc++abi/src/cxa_handlers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698