Bug 1411201 - Don't disable inlining in mozjemalloc on debug builds. r=njn

The way inlining is disabled in mozjemalloc is via a #define of "inline"
to nothing, which is a dubious way to do that. This makes the compiler
trigger warnings we -Werror on for some static functions. While there
are such functions in mozjemalloc.cpp that could be fixed by wrapping
them in the right #ifdefs, there are also others coming from headers,
and it's not something that can be fixed in a satisfactory way.

The right way to disable inlining is to pass the right compiler flags
for that. But inlining is the least of the problems to debug optimized
C++ code, so it feels like if debugging requires some optimization
tweaking, it should be done manually with compile flags when needed,
instead of fiddling with #defines to remove keywords.

--HG--
extra : rebase_source : 962c3409f86060c4d5ddf966778b58b64f89c31d
This commit is contained in:
Mike Hommey 2017-10-24 18:42:24 +09:00
parent e99ba89767
commit ffe63a7d7f

View File

@ -298,15 +298,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
#endif
#endif
#ifdef MOZ_DEBUG
/* Disable inlining to make debugging easier. */
#ifdef inline
#undef inline
#endif
# define inline
#endif
/* Size of stack-allocated buffer passed to strerror_r(). */
#define STRERROR_BUF 64