summaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/TargetFolder.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/TargetFolder.h')
-rw-r--r--include/llvm/Support/TargetFolder.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h
index e9cf585..afed853 100644
--- a/include/llvm/Support/TargetFolder.h
+++ b/include/llvm/Support/TargetFolder.h
@@ -20,31 +20,27 @@
#define LLVM_SUPPORT_TARGETFOLDER_H
#include "llvm/Constants.h"
-#include "llvm/Instruction.h"
#include "llvm/InstrTypes.h"
#include "llvm/Analysis/ConstantFolding.h"
namespace llvm {
class TargetData;
-class LLVMContext;
/// TargetFolder - Create constants with target dependent folding.
class TargetFolder {
const TargetData *TD;
- LLVMContext &Context;
/// 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, Context, TD))
+ if (Constant *CF = ConstantFoldConstantExpression(CE, TD))
return CF;
return C;
}
public:
- explicit TargetFolder(const TargetData *TheTD, LLVMContext &C) :
- TD(TheTD), Context(C) {}
+ explicit TargetFolder(const TargetData *TheTD) : TD(TheTD) {}
//===--------------------------------------------------------------------===//
// Binary Operators
OpenPOWER on IntegriCloud