зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1736968
- Change MOZ_CRASH() to MOZ_ASSUME_UNREACHABLE_MARKER() for abort()'s ARM noreturn case. r=glandium
This MOZ_CRASH() is redundant after calling noreturn function mozalloc_abort. The MOZ_ASSUME_UNREACHABLE_MARKER() annotation makes ARM's "function declared 'noreturn' should not return" warnings go away. Differential Revision: https://phabricator.services.mozilla.com/D129115
This commit is contained in:
Родитель
e6b872fb38
Коммит
50b1318658
|
@ -29,11 +29,8 @@ if CONFIG["OS_TARGET"] == "WINNT":
|
|||
|
||||
UNIFIED_SOURCES += [
|
||||
"mozalloc.cpp",
|
||||
"mozalloc_oom.cpp",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
"mozalloc_abort.cpp",
|
||||
"mozalloc_oom.cpp",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_MEMORY"]:
|
||||
|
@ -45,9 +42,6 @@ if CONFIG["MOZ_MEMORY"]:
|
|||
"cxxalloc.cpp",
|
||||
]
|
||||
|
||||
if CONFIG["CPU_ARCH"] == "arm" and CONFIG["CC_TYPE"] == "clang":
|
||||
SOURCES["mozalloc_abort.cpp"].flags += ["-Wno-infinite-recursion"]
|
||||
|
||||
FINAL_LIBRARY = "mozglue"
|
||||
|
||||
# The strndup declaration in string.h is in an ifdef __USE_GNU section
|
||||
|
|
|
@ -89,8 +89,8 @@ extern "C" void abort(void) {
|
|||
|
||||
// We won't reach here because mozalloc_abort() is MOZ_NORETURN. But that
|
||||
// annotation isn't used on ARM (see mozalloc_abort.h for why) so we add a
|
||||
// redundant MOZ_CRASH() here to avoid a "'noreturn' function does return"
|
||||
// unreachable marker here to avoid a "'noreturn' function does return"
|
||||
// warning.
|
||||
MOZ_CRASH();
|
||||
MOZ_ASSUME_UNREACHABLE_MARKER();
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче