Enforce Treble "wire" ABI by emitting static_asserts for the sizes of
hidl types, such as hidl_handle, hidl_memory, hidl_string and friends.
Bug: 33846034
Test: make
Change-Id: I859b5a7185e2c3e59ef5665e8f8c1f5bb34bced3
diff --git a/generateCpp.cpp b/generateCpp.cpp
index ef26d35..36d205d 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -19,6 +19,7 @@
#include "Coordinator.h"
#include "EnumType.h"
#include "Interface.h"
+#include "HidlTypeAssertion.h"
#include "Method.h"
#include "ScalarType.h"
#include "Scope.h"
@@ -1131,6 +1132,9 @@
}
}
+ HidlTypeAssertion::EmitAll(out);
+ out << "\n";
+
enterLeaveNamespace(out, false /* enter */);
return err;