From b78c9f4f4a53a77ea7267b61e7d90ea7778400df Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 4 Aug 2021 11:15:27 -0400 Subject: Add IsConstant API for Register. --- function.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index fc90a8d1..f8b84a8a 100644 --- a/function.cpp +++ b/function.cpp @@ -106,6 +106,12 @@ RegisterValue::RegisterValue(): state(UndeterminedValue), value(0), offset(0) } +bool RegisterValue::IsConstant() const +{ + return (state == ConstantValue) || (state == ConstantPointerValue); +} + + BNRegisterValue RegisterValue::ToAPIObject() { BNRegisterValue result; -- cgit v1.3.1