diff --git a/compiler/luci/import/include/luci/ImporterEx.h b/compiler/luci/import/include/luci/ImporterEx.h index e00712c724c..52d808a92d1 100644 --- a/compiler/luci/import/include/luci/ImporterEx.h +++ b/compiler/luci/import/include/luci/ImporterEx.h @@ -50,7 +50,7 @@ class ImporterEx final // embedded-import-value-test uses constant data from file(actually ROM) // so unloading file will break the precondition // TODO remove this after embedded-import-value-test has moved to onert-micro - std::unique_ptr importModule(std::vector &model_data) const; + std::unique_ptr importModule(const std::vector &model_data) const; private: const GraphBuilderSource *_source = nullptr; diff --git a/compiler/luci/import/src/ImporterEx.cpp b/compiler/luci/import/src/ImporterEx.cpp index 88b125f1657..1a67f7a7610 100644 --- a/compiler/luci/import/src/ImporterEx.cpp +++ b/compiler/luci/import/src/ImporterEx.cpp @@ -65,9 +65,9 @@ std::unique_ptr ImporterEx::importVerifyModule(const std::string &input_ return importer.importModule(data_data, data_size); } -std::unique_ptr ImporterEx::importModule(std::vector &model_data) const +std::unique_ptr ImporterEx::importModule(const std::vector &model_data) const { - auto data_data = reinterpret_cast(model_data.data()); + auto data_data = reinterpret_cast(model_data.data()); auto data_size = model_data.size(); Importer importer(_source);