[PATCH] D59228: Fix typos in compiler-rt/lib/builtins/atomic.c

Xing Xue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 12:19:08 PDT 2019


xingxue marked 2 inline comments as done.
xingxue added inline comments.


================
Comment at: compiler-rt/lib/builtins/atomic.c:137
   do {\
   switch (size) {\
     case 2:\
----------------
hubert.reinterpretcast wrote:
> Is `IS_LOCK_FREE_1` omitted on purpose?
I think there should be a case for 1 byte as well.  Will add:

    case 1:\
      if (IS_LOCK_FREE_1) {\
        LOCK_FREE_ACTION(uint8_t);\
      }\
      break; \



================
Comment at: compiler-rt/lib/builtins/atomic.c:142
       }\
+      break; \
     case 4:\
----------------
hubert.reinterpretcast wrote:
> The `LOCK_FREE_ACTION` is not supposed to fall-through to here. I am not sure the change is helpful (and it may reduce the ability of compiler warnings to catch bad definitions of `LOCK_FREE_ACTION`).
LOCK_FREE_ACTION is not supposed to fall-through. However, when IS_LOCK_FREE_* is false, the 'if' statement will fall-through. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59228/new/

https://reviews.llvm.org/D59228





More information about the llvm-commits mailing list