From d738104c4b5f787861939f2854056ef016068a4c Mon Sep 17 00:00:00 2001 From: youben11 Date: Thu, 28 Oct 2021 15:55:54 +0100 Subject: [PATCH] fix: use std::string for JIT entrypoint funcname As we store the funcname for the entrypoint for later use, a pointer might point to some random memory when used as there is no special management for that name at the higher levels. --- compiler/include/zamalang/Support/Jit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/include/zamalang/Support/Jit.h b/compiler/include/zamalang/Support/Jit.h index 34212a8e7..835749b0f 100644 --- a/compiler/include/zamalang/Support/Jit.h +++ b/compiler/include/zamalang/Support/Jit.h @@ -104,7 +104,7 @@ public: private: mlir::LLVM::LLVMFunctionType type; - llvm::StringRef name; + std::string name; std::unique_ptr engine; };