[PATCH] D142078: [llvm] Move bit counting functions to bit.h (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 22:50:46 PST 2023


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


================
Comment at: llvm/include/llvm/Support/MathExtras.h:17
 #include "llvm/ADT/bit.h"
-#include "llvm/Support/Compiler.h"
 #include <cassert>
----------------
vzakhari wrote:
> vzakhari wrote:
> > This removal breaks the build with GCC-9*, because `__has_builtin` seems to be available starting GCC-10.  Now we are missing this useful code from `Compiler.h`:
> > ```
> > #ifndef __has_builtin
> > # define __has_builtin(x) 0
> > #endif
> > ```
> > 
> > Can you please bring the `include` back to both `MathExtras.h` and `bit.h`?
> This buildbot is broken as well: https://lab.llvm.org/buildbot/#/builders/94/builds/12995
I just checked in:

https://github.com/llvm/llvm-project/commit/dddcf3014aa094d3ecd0430511a5c10045fefbd6

Thank you for reporting the problem!



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142078



More information about the llvm-commits mailing list