From 3d542fe5881d3693b47628ac1f6bf197ad8540d0 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Tue, 23 Aug 2022 17:44:14 +0800 Subject: [PATCH] Fixed compilation --- taichi/runtime/llvm/llvm_aot_module_loader.cpp | 2 +- taichi/runtime/llvm/llvm_aot_module_loader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/taichi/runtime/llvm/llvm_aot_module_loader.cpp b/taichi/runtime/llvm/llvm_aot_module_loader.cpp index bbb74b0dbb840..6006be8ea7f11 100644 --- a/taichi/runtime/llvm/llvm_aot_module_loader.cpp +++ b/taichi/runtime/llvm/llvm_aot_module_loader.cpp @@ -40,7 +40,7 @@ std::unique_ptr LlvmAotModule::make_new_field( return std::make_unique(std::move(loaded)); } -std::unique_ptr LlvmAotModule::get_graph(std::string name) { +std::unique_ptr LlvmAotModule::get_graph(const std::string& name) { auto it = graphs_.find(name); if (it == graphs_.end()) { TI_DEBUG("Cannot find graph {}", name); diff --git a/taichi/runtime/llvm/llvm_aot_module_loader.h b/taichi/runtime/llvm/llvm_aot_module_loader.h index 2a8b3582eda1c..62c69f5a30745 100644 --- a/taichi/runtime/llvm/llvm_aot_module_loader.h +++ b/taichi/runtime/llvm/llvm_aot_module_loader.h @@ -54,7 +54,7 @@ class LlvmAotModule : public aot::Module { return initialized_snode_tree_ids.count(snode_tree_id); } - std::unique_ptr get_graph(std::string name) override; + std::unique_ptr get_graph(const std::string& name) override; protected: virtual FunctionType convert_module_to_function(