Rename IMMEDIATE_CRASH() -> base::ImmediateCrash()
This is now a [[noreturn]] function instead of a macro. The macro itself
is kept around for now to avoid having to revert this change in case
another IMMEDIATE_CRASH() is added or there exists such calls somewhere
outside src/ that I'm unaware of.
Bug: None
Change-Id: Ibc7921bf7302c94ce151c83a230af5f11fb7b71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999129
Reviewed-by: danakj <[email protected]>
Auto-Submit: Peter Boström <[email protected]>
Commit-Queue: danakj <[email protected]>
Owners-Override: danakj <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1066781}
diff --git a/base/immediate_crash_unittest.cc b/base/immediate_crash_unittest.cc
index 806e2fc..eb38509 100644
--- a/base/immediate_crash_unittest.cc
+++ b/base/immediate_crash_unittest.cc
@@ -23,10 +23,10 @@
namespace {
-// If IMMEDIATE_CRASH() is not treated as noreturn by the compiler, the compiler
+// If ImmediateCrash() is not treated as noreturn by the compiler, the compiler
// will complain that not all paths through this function return a value.
[[maybe_unused]] int TestImmediateCrashTreatedAsNoReturn() {
- IMMEDIATE_CRASH();
+ ImmediateCrash();
}
#if defined(ARCH_CPU_X86_FAMILY)
@@ -201,13 +201,13 @@
} // namespace
-// Attempts to verify the actual instructions emitted by IMMEDIATE_CRASH().
+// Attempts to verify the actual instructions emitted by ImmediateCrash().
// While the test results are highly implementation-specific, this allows macro
// changes (e.g. CLs like https://crrev.com/671123) to be verified using the
// trybots/waterfall, without having to build and disassemble Chrome on
// multiple platforms. This makes it easier to evaluate changes to
-// IMMEDIATE_CRASH() against its requirements (e.g. size of emitted sequence,
-// whether or not multiple IMMEDIATE_CRASH sequences can be folded together, et
+// ImmediateCrash() against its requirements (e.g. size of emitted sequence,
+// whether or not multiple ImmediateCrash sequences can be folded together, et
// cetera). Please see immediate_crash.h for more details about the
// requirements.
//