[iwyu] Move <cmath> out of llvm/Support/MathExtras.h

Interestingly, MathExtras.h doesn't use <cmath> declaration, so move it out of
that header and include it when needed.

No functional change intended, but there's no longer a transitive include
fromMathExtras.h to cmath.
This commit is contained in:
serge-sans-paille committed 2022-09-28 20:49:01 +02:00
1 parent 99c7f83b99
commit 16544cbe64
19 files changed
+30 -1

No files matched your search

+2
View File
@@ -25,6 +25,8 @@
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include <cmath>
namespace llvm {
template <class IRBuilderTy> class FixedPointBuilder {
+1
View File
@@ -53,6 +53,7 @@
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include <cmath>
#include <map>
namespace llvm {
-1
View File
@@ -17,7 +17,6 @@
#include "llvm/Support/Compiler.h"
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <limits>
+2
View File
@@ -15,6 +15,8 @@
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/IR/Instructions.h"
#include <cmath>
namespace llvm {
static const unsigned heatSize = 100;
+2
View File
@@ -14,6 +14,8 @@
#include "llvm/BinaryFormat/MsgPackWriter.h"
#include "llvm/BinaryFormat/MsgPack.h"
#include <cmath>
using namespace llvm;
using namespace msgpack;
@@ -31,6 +31,7 @@
#include "llvm/Support/DivisionByConstantInfo.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetMachine.h"
#include <cmath>
#include <tuple>
#define DEBUG_TYPE "gi-combiner"
+1
View File
@@ -34,6 +34,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cmath>
using namespace llvm;
#define DEBUG_TYPE "codegen"
+2
View File
@@ -14,6 +14,8 @@
#include "llvm/ADT/APFixedPoint.h"
#include "llvm/ADT/APFloat.h"
#include <cmath>
namespace llvm {
APFixedPoint APFixedPoint::convert(const FixedPointSemantics &DstSema,
+2
View File
@@ -14,6 +14,8 @@
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cmath>
#if defined(_WIN32) && !defined(__MINGW32__)
#include <float.h> // For _fpclass in llvm::write_double.
#endif
+1
View File
@@ -30,6 +30,7 @@
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/raw_ostream.h"
#include <array>
#include <cmath>
#include <vector>
//===----------------------------------------------------------------------===//
@@ -31,6 +31,7 @@
#include "llvm/Support/MathExtras.h"
#include "llvm/Transforms/Scalar.h"
#include <cmath>
#include <string>
using namespace llvm;
@@ -27,6 +27,8 @@
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/MisExpect.h"
#include <cmath>
using namespace llvm;
#define DEBUG_TYPE "lower-expect-intrinsic"
@@ -46,6 +46,8 @@
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/MatrixUtils.h"
#include <cmath>
using namespace llvm;
using namespace PatternMatch;
@@ -40,6 +40,9 @@
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <cmath>
using namespace llvm;
#define DEBUG_TYPE "libcalls-shrinkwrap"
@@ -33,6 +33,8 @@
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/SizeOpts.h"
#include <cmath>
using namespace llvm;
using namespace PatternMatch;
@@ -142,6 +142,7 @@
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <functional>
#include <iterator>
@@ -39,6 +39,7 @@
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cmath>
#include <queue>
using namespace llvm;
+2
View File
@@ -23,6 +23,8 @@
#include "llvm/XRay/InstrumentationMap.h"
#include "llvm/XRay/Trace.h"
#include <cmath>
using namespace llvm;
using namespace llvm::xray;
+2
View File
@@ -17,6 +17,8 @@
#include "llvm/XRay/InstrumentationMap.h"
#include "llvm/XRay/Trace.h"
#include <cmath>
using namespace llvm;
using namespace llvm::xray;