summaryrefslogtreecommitdiff
path: root/architecture.cpp
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-02-16 17:54:15 -0500
committerGlenn Smith <glenn@vector35.com>2022-05-11 17:04:32 -0400
commit09c85a868bad7e6e1b1b117eefc2c2aa9aaef4be (patch)
treee2b298049cc02f7b41f182a8f52a9e678c84dbeb /architecture.cpp
parent545fef9216559d08f58f7e20082b36352203a8cf (diff)
Clang+TypeParser APIs
Diffstat (limited to 'architecture.cpp')
-rw-r--r--architecture.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/architecture.cpp b/architecture.cpp
index cd5306ea..b1acceb5 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -140,6 +140,19 @@ BNInstructionTextToken* InstructionTextToken::CreateInstructionTextTokenList(con
}
+void InstructionTextToken::FreeInstructionTextTokenList(BNInstructionTextToken* tokens, size_t count)
+{
+ for (size_t i = 0; i < count; i++)
+ {
+ BNFreeString(tokens[i].text);
+ for (size_t j = 0; j < tokens[i].namesCount; j++)
+ BNFreeString(tokens[i].typeNames[j]);
+ delete[] tokens[i].typeNames;
+ }
+ delete[] tokens;
+}
+
+
vector<InstructionTextToken> InstructionTextToken::ConvertInstructionTextTokenList(
const BNInstructionTextToken* tokens, size_t count)
{