Commit 7bf0e0b4 authored by Henrich Lauko's avatar Henrich Lauko

rst: Fix tristate construction.

parent 589e9aa0
......@@ -58,7 +58,7 @@
#define LART_DOMAIN_KIND( _kind ) \
__attribute__((annotate( NAMESPACE_JOIN(lart.abstract.domain.kind, _kind) )))
#include <rst/tristate.h>
#include <rst/tristate.hpp>
typedef abstract::Tristate __tristate;
......
......@@ -29,8 +29,7 @@ namespace abstract::mstring {
//_LART_INLINE
operator bool() const {
assert( ptr->type().bitwidth() == 1 );
auto tr = __sym_bool_to_tristate( ptr );
if ( __tristate_lower( tr ) ) {
if ( __sym_bool_to_tristate( ptr ) ) {
__sym_assume( ptr, ptr, true );
return true;
} else {
......
......@@ -70,7 +70,7 @@ ICMP( sle, SLE );
ICMP( slt, SLT );
Tristate __star_bool_to_tristate( Unit ) {
return Tristate::Value::Unknown;
return { Tristate::Value::Unknown };
}
Unit __star_assume( Unit, Unit, bool ) {
......
......@@ -198,7 +198,7 @@ __invisible Formula *__sym_ptrtoint( Formula *v )
Tristate __sym_bool_to_tristate( Formula * )
{
// TODO: pattern matching for trivial cases of True/False
return Tristate::Value::Unknown;
return { Tristate::Value::Unknown };
}
__invisible Formula *__sym_assume( Formula *value, Formula *constraint, bool assume )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment