diff --git a/lib/LowerToLLVMPass.cpp b/lib/LowerToLLVMPass.cpp index 00f769f..764d4ca 100644 --- a/lib/LowerToLLVMPass.cpp +++ b/lib/LowerToLLVMPass.cpp @@ -47,10 +47,11 @@ namespace // Create the format string in C format. mlir::Value formatSpecifierString = getOrCreateGlobalString(location, rewriter, "format_specifier", - "%f \0", + llvm::StringRef("%f \0", 4), parentModule); // Create the LF format string in C format. - mlir::Value newLineString = getOrCreateGlobalString(location, rewriter, "new_line", "\n\0", parentModule); + mlir::Value newLineString = getOrCreateGlobalString(location, rewriter, "new_line", + llvm::StringRef("\n\0", 2), parentModule); // Create a loop to print the value in the tensor. llvm::SmallVector loopIterators;