[Mlir-commits] [mlir] 8608ed1 - Apply clang-tidy fixes for llvm-twine-local in OpenMPToLLVMIRTranslation.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Apr 19 17:39:20 PDT 2022


Author: Mehdi Amini
Date: 2022-04-20T00:39:10Z
New Revision: 8608ed14410eb63769bb1fc35a46eb72d799fe14

URL: https://github.com/llvm/llvm-project/commit/8608ed14410eb63769bb1fc35a46eb72d799fe14
DIFF: https://github.com/llvm/llvm-project/commit/8608ed14410eb63769bb1fc35a46eb72d799fe14.diff

LOG: Apply clang-tidy fixes for llvm-twine-local in OpenMPToLLVMIRTranslation.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 7400b5df2628c..c6020a660812e 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(


        


More information about the Mlir-commits mailing list