diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
| commit | 907da171cc911d701da02a5cab898a9c49dd7724 (patch) | |
| tree | 6a111e552c75afc66228e3d8f19b6731e4013f10 /include/llvm/Support/TargetFolder.h | |
| parent | 72cc50852bec44580ee7efe1aa2076273008a6ae (diff) | |
Notes
Diffstat (limited to 'include/llvm/Support/TargetFolder.h')
| -rw-r--r-- | include/llvm/Support/TargetFolder.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index e9cf585b6708..afed853e8679 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 |
