bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 21:05:29 +0000 (21:05 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 21:05:29 +0000 (21:05 +0000)
commit056f8ca7e1b33eeaa36a3bdee6eea0645385dc49
treed0d39a5188d1aa315c5a18880ab8d54a7131a5cb
parent0231bf83716ffb32a3fbc3f050f97a1f2329a36a
bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17
<https://webkit.org/b/186400>

Reviewed by Saam Barati.

Fixes the following warnings when compiling with gnu++17:

    Source/bmalloc/bmalloc/Scavenger.cpp:363:1: error: function 'threadRunLoop' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
    {
    ^
    Source/bmalloc/bmalloc/Scavenger.cpp:358:1: error: function 'threadEntryPoint' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
    {
    ^

* bmalloc/BCompiler.h:
(BCOMPILER): Add support for the BCOMPILER() macro, then add
BCOMPILER(GCC_OR_CLANG).  Taken from Source/WTF/wtf/Compiler.h.
(BNO_RETURN): Implement 'norerturn' support using the new
BCOMPILER() macros.  Taken from Source/WTF/wtf/Compiler.h.
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::threadRunLoop): Remove the workaround that
tricked older compilers into thinking the while() loop wasn't
infinite.
* bmalloc/Scavenger.h:
(bmalloc::Scavenger::threadEntryPoint): Add BNO_RETURN attribute.
(bmalloc::Scavenger::threadRunLoop): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/BCompiler.h
Source/bmalloc/bmalloc/Scavenger.cpp
Source/bmalloc/bmalloc/Scavenger.h