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

Unified Diff: webrtc/rtc_base/checks.h

Issue 3013543002: Revert of Remove typedefs.h from webrtc/ root (part 1) (Closed)
Patch Set: Created 3 years, 3 months 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 | « webrtc/rtc_base/arch.h ('k') | webrtc/rtc_base/checks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/checks.h
diff --git a/webrtc/rtc_base/checks.h b/webrtc/rtc_base/checks.h
index d1a3ccb91b4488f0d3c2309cbd25bfadaac9298e..f9507e239cad0cab48bd20a159d30cf7abdd86e0 100644
--- a/webrtc/rtc_base/checks.h
+++ b/webrtc/rtc_base/checks.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_RTC_BASE_CHECKS_H_
#define WEBRTC_RTC_BASE_CHECKS_H_
+#include "webrtc/typedefs.h"
+
// If you for some reson need to know if DCHECKs are on, test the value of
// RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be
// defined, to either a true or a false value.)
@@ -20,20 +22,10 @@
#define RTC_DCHECK_IS_ON 0
#endif
-// Annotate a function that will not return control flow to the caller.
-#if defined(_MSC_VER)
-#define RTC_NO_RETURN __declspec(noreturn)
-#elif defined(__GNUC__)
-#define RTC_NO_RETURN __attribute__ ((__noreturn__))
-#else
-#define RTC_NO_RETURN
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
-RTC_NO_RETURN
- void rtc_FatalMessage(const char* file, int line, const char* msg);
+NO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg);
#ifdef __cplusplus
} // extern "C"
#endif
@@ -240,7 +232,7 @@
FatalMessage(const char* file, int line);
// Used for RTC_CHECK_EQ(), etc. Takes ownership of the given string.
FatalMessage(const char* file, int line, std::string* result);
- RTC_NO_RETURN ~FatalMessage();
+ NO_RETURN ~FatalMessage();
std::ostream& stream() { return stream_; }
« no previous file with comments | « webrtc/rtc_base/arch.h ('k') | webrtc/rtc_base/checks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698