[libunwind] r321679 - Don't use a strict larger-than comparison in the check_fit/does_fit static assert

Martin Storsjo via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 14:11:22 PST 2018


Author: mstorsjo
Date: Tue Jan  2 14:11:22 2018
New Revision: 321679

URL: http://llvm.org/viewvc/llvm-project?rev=321679&view=rev
Log:
Don't use a strict larger-than comparison in the check_fit/does_fit static assert

For builds that only target one architecture, this was required to
be an exact match, while it previously required the allocation to be
strictly larger than the largest concrete one. Requiring it to be
larger than on equal should be enough.

This makes it more straightforward to update _LIBUNWIND_CONTEXT_SIZE
and _LIBUNWIND_CURSOR_SIZE.

Modified:
    libunwind/trunk/src/config.h

Modified: libunwind/trunk/src/config.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/config.h?rev=321679&r1=321678&r2=321679&view=diff
==============================================================================
--- libunwind/trunk/src/config.h (original)
+++ libunwind/trunk/src/config.h Tue Jan  2 14:11:22 2018
@@ -155,7 +155,7 @@
 #if defined(_LIBUNWIND_IS_NATIVE_ONLY)
 # define COMP_OP ==
 #else
-# define COMP_OP <
+# define COMP_OP <=
 #endif
 template <typename _Type, typename _Mem>
 struct check_fit {




More information about the cfe-commits mailing list