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/Context.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/Core/Context.cpp') diff --git a/lib/Core/Context.cpp b/lib/Core/Context.cpp index 590b2080..45dbdca0 100644 --- a/lib/Core/Context.cpp +++ b/lib/Core/Context.cpp @@ -35,18 +35,6 @@ const Context &Context::get() { // FIXME: This is a total hack, just to avoid a layering issue until this stuff // moves out of Expr. -Expr::Width Expr::getWidthForLLVMType(const llvm::Type *t) { - switch (t->getTypeID()) { - default: - assert(0 && "non-primitive type argument to Expr::getTypeForLLVMType()\n"); - case llvm::Type::IntegerTyID: return cast(t)->getBitWidth(); - case llvm::Type::FloatTyID: return Expr::Int32; - case llvm::Type::DoubleTyID: return Expr::Int64; - case llvm::Type::X86_FP80TyID: return 80; - case llvm::Type::PointerTyID: return Context::get().getPointerWidth(); - } -} - ref Expr::createCoerceToPointerType(ref e) { return ZExtExpr::create(e, Context::get().getPointerWidth()); } -- cgit 1.4.1