From 4ea22c09a24929820cfed146e506300a8b87f53c Mon Sep 17 00:00:00 2001 From: Lauri Vasama Date: Thu, 18 Sep 2025 14:14:37 +0300 Subject: [PATCH] Set helper return type struct name in Clifter --- lib/mlir/Dialect/Clift/Utils/ImportLLVM.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/mlir/Dialect/Clift/Utils/ImportLLVM.cpp b/lib/mlir/Dialect/Clift/Utils/ImportLLVM.cpp index 33f04549d..ce0c40cbf 100644 --- a/lib/mlir/Dialect/Clift/Utils/ImportLLVM.cpp +++ b/lib/mlir/Dialect/Clift/Utils/ImportLLVM.cpp @@ -17,6 +17,7 @@ #include "revng/RestructureCFG/ScopeGraphGraphTraits.h" #include "revng/Support/Debug.h" #include "revng/Support/FunctionTags.h" +#include "revng/Support/Identifier.h" #include "revng/mlir/Dialect/Clift/IR/CliftOps.h" #include "revng/mlir/Dialect/Clift/Utils/ImportLLVM.h" #include "revng/mlir/Dialect/Clift/Utils/ImportModel.h" @@ -278,7 +279,11 @@ private: auto Handle = pipeline::locationString(revng::ranks::HelperStructType, HelperName.str()); - return StructType::get(Context, Handle, "", Offset, Fields); + std::string + Name = Model.Configuration().Naming().artificialReturnValuePrefix().str() + + sanitizeIdentifier(HelperName); + + return StructType::get(Context, Handle, Name, Offset, Fields); } // Import a Clift function type from an LLVM function type and a helper name