diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-06-02 17:01:00 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-02 17:01:00 +0000 |
| commit | 4aea9d3d47e7e47630704fdf6628221fa45f6151 (patch) | |
| tree | 5e74319cdcc91f362f6d27bd4befcb5c42131d66 /lib/Core/Memory.h | |
| parent | 1016ee0df2a459881d6f9930f7b72929e8bdc8b8 (diff) | |
| download | klee-4aea9d3d47e7e47630704fdf6628221fa45f6151.tar.gz | |
Use ConstantExpr::alloc instead of ref<Expr> directly
- The "constant optimization" embedded inside ref<Expr> is going away. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/Memory.h')
| -rw-r--r-- | lib/Core/Memory.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Core/Memory.h b/lib/Core/Memory.h index 0f09b162..cfb4ab43 100644 --- a/lib/Core/Memory.h +++ b/lib/Core/Memory.h @@ -118,7 +118,7 @@ public: ref<Expr> getBoundsCheckOffset(ref<Expr> offset) const { if (size==0) { - return EqExpr::create(offset, ref<Expr>(0, kMachinePointerType)); + return EqExpr::create(offset, ConstantExpr::alloc(0, kMachinePointerType)); } else { return UltExpr::create(offset, getSizeExpr()); } @@ -126,9 +126,9 @@ public: ref<Expr> getBoundsCheckOffset(ref<Expr> offset, unsigned bytes) const { if (bytes<=size) { return UltExpr::create(offset, - ref<Expr>(size - bytes + 1, kMachinePointerType)); + ConstantExpr::alloc(size - bytes + 1, kMachinePointerType)); } else { - return ref<Expr>(0, Expr::Bool); + return ConstantExpr::alloc(0, Expr::Bool); } } }; |
