diff options
Diffstat (limited to 'lib/Core/Context.cpp')
-rw-r--r-- | lib/Core/Context.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Core/Context.cpp b/lib/Core/Context.cpp index 45dbdca0..979970aa 100644 --- a/lib/Core/Context.cpp +++ b/lib/Core/Context.cpp @@ -35,7 +35,11 @@ const Context &Context::get() { // FIXME: This is a total hack, just to avoid a layering issue until this stuff // moves out of Expr. -ref<Expr> Expr::createCoerceToPointerType(ref<Expr> e) { +ref<Expr> Expr::createSExtToPointerWidth(ref<Expr> e) { + return SExtExpr::create(e, Context::get().getPointerWidth()); +} + +ref<Expr> Expr::createZExtToPointerWidth(ref<Expr> e) { return ZExtExpr::create(e, Context::get().getPointerWidth()); } |