aboutsummaryrefslogtreecommitdiff
path: root/HandleType.h
diff options
context:
space:
mode:
authorNirav Atre <natre@google.com>2018-06-12 21:33:31 -0700
committerNirav Atre <natre@google.com>2018-06-12 21:50:07 -0700
commit89463bd50359c28429fd5e6a8825e2a229f889c9 (patch)
treebe81817c626d7c2bb5d361f89240825194b05cb0 /HandleType.h
parente7cc03329dc5a9f4e1f36430062d8f6abf013918 (diff)
downloadhidl-89463bd50359c28429fd5e6a8825e2a229f889c9.tar.gz
Explicit destructor invocation for HIDL types
This change adds a pure virtual method (emitTypeDestructorCall) to Types.h, intended to emit invocations of type-specific destructors. This functionality is required for the upcoming implementation of HIDL safe unions (to destruct non-POD variant fields instantiated using the placement new operator). Bug: 79878527 Test: Re-flashed device, and ran the HIDL test suite Change-Id: I5e88aa8e7e9ebf97d70686481bc69e826b6074c9
Diffstat (limited to 'HandleType.h')
-rw-r--r--HandleType.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/HandleType.h b/HandleType.h
index feaddb00..7fe6f743 100644
--- a/HandleType.h
+++ b/HandleType.h
@@ -56,6 +56,8 @@ struct HandleType : public Type {
const std::string &parentName,
const std::string &offsetText) const override;
+ void emitTypeDestructorCall(Formatter& out, const std::string& objName) const override;
+
bool needsEmbeddedReadWrite() const override;
bool deepIsJavaCompatible(std::unordered_set<const Type*>* visited) const override;