diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 11:08:44 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 11:08:44 +0000 |
commit | 357a27dc855c3247c2a73120fbcb98e708564400 (patch) | |
tree | b32dad9e6075f8f292819f06d26e306fc94427a0 /include | |
parent | 85b03769dd6b0e85b3624a49dd78894b621e7b43 (diff) | |
download | external_llvm-357a27dc855c3247c2a73120fbcb98e708564400.zip external_llvm-357a27dc855c3247c2a73120fbcb98e708564400.tar.gz external_llvm-357a27dc855c3247c2a73120fbcb98e708564400.tar.bz2 |
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/BitVector.h | 3 | ||||
-rw-r--r-- | include/llvm/ADT/DenseMap.h | 2 | ||||
-rw-r--r-- | include/llvm/ADT/ilist | 1 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpressions.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 8 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 4 | ||||
-rw-r--r-- | include/llvm/Target/SubtargetFeature.h | 1 | ||||
-rw-r--r-- | include/llvm/Target/TargetJITInfo.h | 3 |
9 files changed, 17 insertions, 11 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index 3ff2441..a3a8920 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -16,8 +16,9 @@ #include "llvm/Support/MathExtras.h" #include <algorithm> -#include <cstdlib> #include <cassert> +#include <cstdlib> +#include <cstring> namespace llvm { diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index fdfb329..b29c691 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -313,7 +313,7 @@ private: NumEntries = 0; NumTombstones = 0; NumBuckets = InitBuckets; - assert(InitBuckets && (InitBuckets & InitBuckets-1) == 0 && + assert(InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 && "# initial buckets must be a power of two!"); Buckets = reinterpret_cast<BucketT*>(new char[sizeof(BucketT)*InitBuckets]); // Initialize all the keys to EmptyKey. diff --git a/include/llvm/ADT/ilist b/include/llvm/ADT/ilist index d58db80..fe55f5c 100644 --- a/include/llvm/ADT/ilist +++ b/include/llvm/ADT/ilist @@ -40,6 +40,7 @@ #include "llvm/ADT/iterator" #include <cassert> +#include <cstdlib> namespace llvm { diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 4cb03fb..789b904 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -404,13 +404,14 @@ public: if (BranchInst *BI = dyn_cast<BranchInst>(BackedgeBlock->getTerminator())) if (BI->isConditional()) { if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { - if (ICI->getOperand(0) == Inc) + if (ICI->getOperand(0) == Inc) { if (BI->getSuccessor(0) == getHeader()) { if (ICI->getPredicate() == ICmpInst::ICMP_NE) return ICI->getOperand(1); } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { return ICI->getOperand(1); } + } } } diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index 905493a..39b083d 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -253,11 +253,12 @@ namespace llvm { virtual bool hasComputableLoopEvolution(const Loop *L) const { bool HasVarying = false; for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (!getOperand(i)->isLoopInvariant(L)) + if (!getOperand(i)->isLoopInvariant(L)) { if (getOperand(i)->hasComputableLoopEvolution(L)) HasVarying = true; else return false; + } return HasVarying; } diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 453fe2c..48e8e55 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -211,8 +211,8 @@ public: // If the first node isn't one we're interested in, advance to one that // we are interested in. if (op) { - if (!ReturnUses && op->isUse() || - !ReturnDefs && op->isDef()) + if ((!ReturnUses && op->isUse()) || + (!ReturnDefs && op->isDef())) ++*this; } } @@ -240,8 +240,8 @@ public: Op = Op->getNextOperandForReg(); // If this is an operand we don't care about, skip it. - while (Op && (!ReturnUses && Op->isUse() || - !ReturnDefs && Op->isDef())) + while (Op && ((!ReturnUses && Op->isUse()) || + (!ReturnDefs && Op->isDef()))) Op = Op->getNextOperandForReg(); return *this; diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index d6a492d..c1a50bb 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -843,8 +843,8 @@ template<> struct DenseMapInfo<SDOperand> { static inline SDOperand getEmptyKey() { return SDOperand((SDNode*)-1, -1U); } static inline SDOperand getTombstoneKey() { return SDOperand((SDNode*)-1, 0);} static unsigned getHashValue(const SDOperand &Val) { - return (unsigned)((uintptr_t)Val.Val >> 4) ^ - (unsigned)((uintptr_t)Val.Val >> 9) + Val.ResNo; + return ((unsigned)((uintptr_t)Val.Val >> 4) ^ + (unsigned)((uintptr_t)Val.Val >> 9)) + Val.ResNo; } static bool isEqual(const SDOperand &LHS, const SDOperand &RHS) { return LHS == RHS; diff --git a/include/llvm/Target/SubtargetFeature.h b/include/llvm/Target/SubtargetFeature.h index 98a5892..d187daa 100644 --- a/include/llvm/Target/SubtargetFeature.h +++ b/include/llvm/Target/SubtargetFeature.h @@ -21,6 +21,7 @@ #include <string> #include <vector> #include <iosfwd> +#include <cstring> #include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h index 1ad927b..98d17c4 100644 --- a/include/llvm/Target/TargetJITInfo.h +++ b/include/llvm/Target/TargetJITInfo.h @@ -17,8 +17,9 @@ #ifndef LLVM_TARGET_TARGETJITINFO_H #define LLVM_TARGET_TARGETJITINFO_H -#include <cassert> #include <vector> +#include <cassert> +#include "llvm/Support/DataTypes.h" namespace llvm { class Function; |