Commit 696f31ba authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[cleanup] extern "C" not needed for V8_Fatal

Why I want to fix this: I got a CL to replace V8_NORETURN by
[[noreturn]], but clang-format formats this as
  extern "C"[[noreturn]] PRINT_FORMAT...
(i.e. missing whitespace).
Also, this is the only extern "C" function in our code base, so if we
do not need to call it from C, we should just get rid of it.

R=jochen@chromium.org
BUG=v8:6474

Change-Id: I950bdc505822eb37a107c58e63c82a61907ba515
Reviewed-on: https://chromium-review.googlesource.com/539341Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46149}
parent 5a91b476
...@@ -109,7 +109,7 @@ DEFINE_CHECK_OP_IMPL(GT) ...@@ -109,7 +109,7 @@ DEFINE_CHECK_OP_IMPL(GT)
// Contains protection against recursive calls (faults while handling faults). // Contains protection against recursive calls (faults while handling faults).
extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { void V8_Fatal(const char* file, int line, const char* format, ...) {
fflush(stdout); fflush(stdout);
fflush(stderr); fflush(stderr);
v8::base::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, v8::base::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "src/base/build_config.h" #include "src/base/build_config.h"
#include "src/base/compiler-specific.h" #include "src/base/compiler-specific.h"
extern "C" V8_NORETURN PRINTF_FORMAT(3, 4) V8_BASE_EXPORT V8_NORETURN PRINTF_FORMAT(3, 4) V8_BASE_EXPORT
void V8_Fatal(const char* file, int line, const char* format, ...); void V8_Fatal(const char* file, int line, const char* format, ...);
// The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment