summaryrefslogtreecommitdiff
path: root/function.cpp
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2021-08-04 11:15:27 -0400
committerBrian Potchik <brian@vector35.com>2021-08-04 11:15:27 -0400
commitb78c9f4f4a53a77ea7267b61e7d90ea7778400df (patch)
tree2d36030f9de8f0dddad0c9690e8192ae5b9da68f /function.cpp
parent98c2b6f32e3181a3a3462c6bd41306ff674a515b (diff)
Add IsConstant API for Register.
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp6
1 files changed, 6 insertions, 0 deletions
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;