Exemplo n.º 1
0
		Value Value::PredicateExpr(Predicate predicate, const Type* const boolType) {
			if (predicate.isTrue()) {
				return Value::Constant(Constant::True(), boolType);
			} else if (predicate.isFalse()) {
				return Value::Constant(Constant::False(), boolType);
			} else if (predicate.isVariable()) {
				return Value::TemplateVarRef(predicate.variableTemplateVar(), boolType);
			}
			
			Value value(PREDICATE, boolType, ExitStates::Normal());
			value.impl_->predicate = make_optional(std::move(predicate));
			return value;
		}