From 8608ed14410eb63769bb1fc35a46eb72d799fe14 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 16 Apr 2022 08:21:24 +0000 Subject: [PATCH] Apply clang-tidy fixes for llvm-twine-local in OpenMPToLLVMIRTranslation.cpp (NFC) --- .../Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp index 7400b5df2628..c6020a660812 100644 --- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp @@ -1286,7 +1286,7 @@ convertOmpThreadprivate(Operation &opInst, llvm::IRBuilderBase &builder, type); llvm::ConstantInt *size = builder.getInt64(typeSize.getFixedSize()); llvm::StringRef suffix = llvm::StringRef(".cache", 6); - llvm::Twine cacheName = Twine(global.getSymName()).concat(suffix); + std::string cacheName = (Twine(global.getSymName()).concat(suffix)).str(); // Emit runtime function and bitcast its type (i8*) to real data type. llvm::Value *callInst = moduleTranslation.getOpenMPBuilder()->createCachedThreadPrivate(