Sanitizers.h - remove MathExtras.h include dependency
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 9 Jun 2021 13:37:56 +0000 (14:37 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 9 Jun 2021 13:38:20 +0000 (14:38 +0100)
commit206a66de5902b2b6dc0c62c4a25526d7e7f24186
treebb1d5625a7cceb28c83471f7992bfb9bfa4798e7
parent6c78dbd4ca1f2c25cdc276d646c7920afe856ca3
Sanitizers.h - remove MathExtras.h include dependency

The MathExtras.h header is included purely for the countPopulation() method - by moving this into Sanitizers.cpp we can remove the use of this costly header.

We only ever use isPowerOf2() / countPopulation() inside asserts so this shouldn't have any performance effects on production code.

Differential Revision: https://reviews.llvm.org/D103953
clang/include/clang/Basic/Sanitizers.h
clang/lib/Basic/Sanitizers.cpp