summaryrefslogtreecommitdiff
path: root/compiler/tflchef/tools/console/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/tflchef/tools/console/Driver.cpp')
-rw-r--r--compiler/tflchef/tools/console/Driver.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/tflchef/tools/console/Driver.cpp b/compiler/tflchef/tools/console/Driver.cpp
index d6f7ba1ae..23f2fff3f 100644
--- a/compiler/tflchef/tools/console/Driver.cpp
+++ b/compiler/tflchef/tools/console/Driver.cpp
@@ -22,7 +22,7 @@
#include <iostream>
-int entry(int argc, char **argv)
+int entry_stream(std::istream &is)
{
int32_t model_version = 1;
@@ -30,7 +30,7 @@ int entry(int argc, char **argv)
// Read a model recipe from standard input
{
- google::protobuf::io::IstreamInputStream iis{&std::cin};
+ google::protobuf::io::IstreamInputStream iis{&is};
if (!google::protobuf::TextFormat::Parse(&iis, &model_recipe))
{
std::cerr << "ERROR: Failed to parse recipe" << std::endl;
@@ -56,3 +56,9 @@ int entry(int argc, char **argv)
return 0;
}
+
+int entry(int, char **)
+{
+ // forward to entry_stream
+ return entry_stream(std::cin);
+}