fix: explicitly specify the length of the format string and new line string.
Signed-off-by: jackfiled <xcrenchangjun@outlook.com>
This commit is contained in:
parent
14a2b4c558
commit
a98e9aec78
|
@ -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<mlir::Value, 4> loopIterators;
|
||||
|
|
Loading…
Reference in New Issue
Block a user