Commit 8371a29
Wrap
Macros that expand into multiple terms can cause interesting preprocessor hickups depending
on the context they are used in. llvm/llvm-project#56867 reported
a miscompilation of `llvm_unreachable(msg)` inside a `LLVM_DEBUG({ ... })` block. We were
able to fix it by wrapping the expansion in a `do {} while(false)`.
Differential Revision: https://reviews.llvm.org/D131337
(cherry picked from commit 7a66fe1)llvm_unreachable macro in do-while loop1 parent d6e5bfc commit 8371a29
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
0 commit comments