[compiler-rt] Fixing UB on Windows for trampoline allocations (PR #85639)

Zack Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 06:58:38 PDT 2024


zacklj89 wrote:

> > This is _actually_ used on Windows, so removing `UNUSED`
> 
> No, it's not used in i386 mode. It's used in some modes, but not all - therefore it is marked as unused to silence warnings in those build configuration. See [979c38c](https://github.com/llvm/llvm-project/commit/979c38cc74f4e96c5e1bee1f966a81038fff1ed6) which introduced the attribute here.

Then shouldn't it be guarded by `#if SANITIZER_WINDOWS64` rather than `UNUSED`? When I was debugging I was confused by the presence of `UNUSED`.

https://github.com/llvm/llvm-project/pull/85639


More information about the llvm-commits mailing list