[all-commits] [llvm/llvm-project] 206a66: Sanitizers.h - remove MathExtras.h include dependency

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Jun 9 06:38:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 206a66de5902b2b6dc0c62c4a25526d7e7f24186
      https://github.com/llvm/llvm-project/commit/206a66de5902b2b6dc0c62c4a25526d7e7f24186
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-06-09 (Wed, 09 Jun 2021)

  Changed paths:
    M clang/include/clang/Basic/Sanitizers.h
    M clang/lib/Basic/Sanitizers.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list