diff options
| author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-10-10 15:13:06 +0200 |
|---|---|---|
| committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-11-12 10:13:54 +0000 |
| commit | c763a4087f1d8fa4dbdfb9c8f30d545cdb66a0aa (patch) | |
| tree | 5d40c27ecfb16230aa3e714a3e7690b44b322860 /lib/Core/Memory.cpp | |
| parent | acdb9a692d9eee8dd102befa4e101bfa5f028b0e (diff) | |
| download | klee-c763a4087f1d8fa4dbdfb9c8f30d545cdb66a0aa.tar.gz | |
Ref: implement operator bool()
Diffstat (limited to 'lib/Core/Memory.cpp')
| -rw-r--r-- | lib/Core/Memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp index bf00ee4b..86b06701 100644 --- a/lib/Core/Memory.cpp +++ b/lib/Core/Memory.cpp @@ -135,7 +135,7 @@ ObjectState::~ObjectState() { } ArrayCache *ObjectState::getArrayCache() const { - assert(!object.isNull() && "object was NULL"); + assert(object && "object was NULL"); return object->parent->getArrayCache(); } @@ -149,7 +149,7 @@ const UpdateList &ObjectState::getUpdates() const { // FIXME: We should be able to do this more efficiently, we just need to be // careful to get the interaction with the cache right. In particular we // should avoid creating UpdateNode instances we never use. - unsigned NumWrites = updates.head.isNull() ? 0 : updates.head->getSize(); + unsigned NumWrites = updates.head ? updates.head->getSize() : 0; std::vector< std::pair< ref<Expr>, ref<Expr> > > Writes(NumWrites); const auto *un = updates.head.get(); for (unsigned i = NumWrites; i != 0; un = un->next.get()) { @@ -219,7 +219,7 @@ void ObjectState::makeConcrete() { } void ObjectState::makeSymbolic() { - assert(updates.head.isNull() && + assert(!updates.head && "XXX makeSymbolic of objects with symbolic values is unsupported"); // XXX simplify this, can just delete various arrays I guess |
