Extend hidl-gen to support generate vts file.
b/30762234
TODO: add regression test.
Change-Id: I1c31fd9a85805cd450ea03cc0ccc750a756d1009
diff --git a/ScalarType.cpp b/ScalarType.cpp
index bf111ca..b87168e 100644
--- a/ScalarType.cpp
+++ b/ScalarType.cpp
@@ -147,5 +147,15 @@
handleError(out, mode);
}
+
+status_t ScalarType::emitVtsTypeDeclarations(Formatter &out) const {
+ std::string extra;
+ out << "type: TYPE_SCALAR\n"
+ << "scalar_type: "
+ << getCppType(StorageMode_Stack, &extra)
+ << "\n";
+ return OK;
+}
+
} // namespace android