[all-commits] [llvm/llvm-project] e35182: Fix compilation of CodeLayout.cpp for MacOS

Yevgeny Rouban via All-commits all-commits at lists.llvm.org
Mon Oct 3 07:52:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3518210880958126760bc3a8c200947abb73520
      https://github.com/llvm/llvm-project/commit/e3518210880958126760bc3a8c200947abb73520
  Author: Yevgeny Rouban <yrouban at azul.com>
  Date:   2022-10-03 (Mon, 03 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/CodeLayout.cpp

  Log Message:
  -----------
  Fix compilation of CodeLayout.cpp for MacOS

llvm/lib/Transforms/Utils/CodeLayout.cpp uses std::abs() with double argument,
which is provided by cmath header, which is not explicitly included into CodeLayout.cpp.
The implicit include in llvm/include/llvm/Support/MathExtras.h was removed in
commit 16544cbe64b81a50800a88296ef37f4873a37b25

Inserting explicit include of cmath into CodeLayout.cpp in order to fix build on MacOS.

Committed on behalf of alsemenov (Aleksei Semenov)
Reviewed By: thieta
Differential Revision: https://reviews.llvm.org/D135072




More information about the All-commits mailing list