Silence -Wmissing-noreturn.
This warning generates a lot of false positives because we often create stubs
and compile-time configurations with things like VIXL_UNIMPLEMENTED(). Properly
satisfying -Wmissing-noreturn requires that we annotate functions at their
_declarations_, which means we need to add #ifdefs to the header files.
Conditional compilation in headers can result in incorrect behaviour when
libvixl.so is built with different flags than the code using it. Disabling this
warning allows us to simplify the headers, and should make VIXL more robust.
Change-Id: I9bb727be1cf1e2e003491701be25c7b27bd4e2a7
diff --git a/src/code-buffer-vixl.h b/src/code-buffer-vixl.h
index d0d815e..04151b2 100644
--- a/src/code-buffer-vixl.h
+++ b/src/code-buffer-vixl.h
@@ -44,15 +44,12 @@
void Reset();
-#ifdef VIXL_CODE_BUFFER_MMAP
+ // Make the buffer executable or writable. These states are mutually
+ // exclusive.
+ // Note that these require page-aligned memory blocks, which we can only
+ // guarantee with VIXL_CODE_BUFFER_MMAP.
void SetExecutable();
void SetWritable();
-#else
- // These require page-aligned memory blocks, which we can only guarantee with
- // mmap.
- VIXL_NO_RETURN_IN_DEBUG_MODE void SetExecutable() { VIXL_UNIMPLEMENTED(); }
- VIXL_NO_RETURN_IN_DEBUG_MODE void SetWritable() { VIXL_UNIMPLEMENTED(); }
-#endif
ptrdiff_t GetOffsetFrom(ptrdiff_t offset) const {
ptrdiff_t cursor_offset = cursor_ - buffer_;