[all-commits] [llvm/llvm-project] 2d3d62: [flang] fix: split ifndef for CHECK and CHECK_MSG ...

Ivan Aksamentov via All-commits all-commits at lists.llvm.org
Tue Dec 24 23:47:52 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d3d62d77e2d011c9dbdb12732aca3070efc83ca
      https://github.com/llvm/llvm-project/commit/2d3d62d77e2d011c9dbdb12732aca3070efc83ca
  Author: Ivan Aksamentov <ivan.aksamentov at gmail.com>
  Date:   2024-12-25 (Wed, 25 Dec 2024)

  Changed paths:
    M flang/include/flang/Common/idioms.h

  Log Message:
  -----------
  [flang] fix: split ifndef for CHECK and CHECK_MSG (#114707)

Resolves https://github.com/llvm/llvm-project/issues/114703

I think it's the best practice that each macro has it's own `ifndef`
check and this way the build issue is resolved for me.

I also find the names of these macro a bit too generic - an easy recipe
for conflicts. In my case, the error was likely caused by something else
defining `CHECK` but not `CHECK_MSG`, so likely these `CHECK` and
`CHECK_MSG` weren't actually working at all because the result of
`ifndef` is always false.

As a definitive fix, perhaps it makes sense to rename them to something
more specific, e.g. `FLANG_CHECK` and `FLANG_CHECK_MSG`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list