From 717c804da48ee71f4b5aeee3ac0ba6c62a537224 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 24 Jun 2010 22:12:27 +0000 Subject: Use LLVM's TargetData::getTypeSizeInBits to determine type bitwidth instead of our own implementation git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@106800 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/ExecutorUtil.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Core/ExecutorUtil.cpp') diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp index 5164e927..04264164 100644 --- a/lib/Core/ExecutorUtil.cpp +++ b/lib/Core/ExecutorUtil.cpp @@ -53,9 +53,9 @@ namespace klee { abort(); case Instruction::Trunc: - return op1->Extract(0, Expr::getWidthForLLVMType(type)); - case Instruction::ZExt: return op1->ZExt(Expr::getWidthForLLVMType(type)); - case Instruction::SExt: return op1->SExt(Expr::getWidthForLLVMType(type)); + return op1->Extract(0, getWidthForLLVMType(type)); + case Instruction::ZExt: return op1->ZExt(getWidthForLLVMType(type)); + case Instruction::SExt: return op1->SExt(getWidthForLLVMType(type)); case Instruction::Add: return op1->Add(op2); case Instruction::Sub: return op1->Sub(op2); case Instruction::Mul: return op1->Mul(op2); @@ -72,10 +72,10 @@ namespace klee { case Instruction::BitCast: return op1; case Instruction::IntToPtr: - return op1->ZExt(Expr::getWidthForLLVMType(type)); + return op1->ZExt(getWidthForLLVMType(type)); case Instruction::PtrToInt: - return op1->ZExt(Expr::getWidthForLLVMType(type)); + return op1->ZExt(getWidthForLLVMType(type)); case Instruction::GetElementPtr: { ref base = op1->ZExt(Context::get().getPointerWidth()); -- cgit 1.4.1