diff options
author | ed <ed@FreeBSD.org> | 2009-06-03 13:28:00 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-03 13:28:00 +0000 |
commit | 036fdcfb2d357cecb320b5a6fd05f4859a63aeba (patch) | |
tree | 90502b3518861e1704738c228456f7079013368b /include | |
parent | 3277b69d734b9c90b44ebde4ede005717e2c3b2e (diff) | |
download | FreeBSD-src-036fdcfb2d357cecb320b5a6fd05f4859a63aeba.zip FreeBSD-src-036fdcfb2d357cecb320b5a6fd05f4859a63aeba.tar.gz |
Import LLVM, at r72770.
This should fix LLVM PR4225.
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/ilist.h | 8 | ||||
-rw-r--r-- | include/llvm/Analysis/ConstantFolding.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpressions.h | 1 | ||||
-rw-r--r-- | include/llvm/Support/TargetFolder.h | 12 |
4 files changed, 12 insertions, 11 deletions
diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h index 9eb7005..b95e3e0 100644 --- a/include/llvm/ADT/ilist.h +++ b/include/llvm/ADT/ilist.h @@ -481,8 +481,8 @@ private: L2.setTail(0); // Remove [first, last) from its old position. - NodeTy *First = &*first, *Prev = getPrev(First); - NodeTy *Next = last.getNodePtrUnchecked(), *Last = getPrev(Next); + NodeTy *First = &*first, *Prev = this->getPrev(First); + NodeTy *Next = last.getNodePtrUnchecked(), *Last = this->getPrev(Next); if (Prev) this->setNext(Prev, Next); else @@ -491,7 +491,7 @@ private: // Splice [first, last) into its new position. NodeTy *PosNext = position.getNodePtrUnchecked(); - NodeTy *PosPrev = getPrev(PosNext); + NodeTy *PosPrev = this->getPrev(PosNext); // Fix head of list... if (PosPrev) @@ -504,7 +504,7 @@ private: this->setNext(Last, PosNext); this->setPrev(PosNext, Last); - transferNodesFromList(L2, First, PosNext); + this->transferNodesFromList(L2, First, PosNext); // Now that everything is set, restore the pointers to the list sentinels. L2.setTail(L2Sentinel); diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h index bf360f7..5fdf6d2 100644 --- a/include/llvm/Analysis/ConstantFolding.h +++ b/include/llvm/Analysis/ConstantFolding.h @@ -34,7 +34,7 @@ Constant *ConstantFoldInstruction(Instruction *I, const TargetData *TD = 0); /// using the specified TargetData. If successful, the constant result is /// result is returned, if not, null is returned. Constant *ConstantFoldConstantExpression(ConstantExpr *CE, - const TargetData *TD); + const TargetData *TD = 0); /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the /// specified operands. If successful, the constant result is returned, if not, diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index 264447e..1978055 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -19,7 +19,6 @@ namespace llvm { class ConstantInt; class ConstantRange; - class APInt; class DominatorTree; enum SCEVTypes { diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index 14f2c9b..172e4fe 100644 --- a/include/llvm/Support/TargetFolder.h +++ b/include/llvm/Support/TargetFolder.h @@ -9,8 +9,10 @@ // // This file defines the TargetFolder class, a helper for IRBuilder. // It provides IRBuilder with a set of methods for creating constants with -// target dependent folding. For general constant creation and folding, -// use ConstantExpr and the routines in llvm/Analysis/ConstantFolding.h. +// target dependent folding, in addition to the same target-independent +// folding that the ConstantFolder class provides. For general constant +// creation and folding, use ConstantExpr and the routines in +// llvm/Analysis/ConstantFolding.h. // //===----------------------------------------------------------------------===// @@ -26,18 +28,18 @@ class TargetData; /// TargetFolder - Create constants with target dependent folding. class TargetFolder { - const TargetData &TD; + const TargetData *TD; /// Fold - Fold the constant using target specific information. Constant *Fold(Constant *C) const { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) - if (Constant *CF = ConstantFoldConstantExpression(CE, &TD)) + if (Constant *CF = ConstantFoldConstantExpression(CE, TD)) return CF; return C; } public: - TargetFolder(const TargetData &TheTD) : TD(TheTD) {} + explicit TargetFolder(const TargetData *TheTD) : TD(TheTD) {} //===--------------------------------------------------------------------===// // Binary Operators |