[Mlir-commits] [mlir] 86b14d0 - [mlir] Attempt to appease gcc-5 const char* -> StringLiteral conversion issu

Nicolas Vasilache llvmlistbot at llvm.org
Fri Oct 2 07:54:38 PDT 2020


Author: Nicolas Vasilache
Date: 2020-10-02T10:53:48-04:00
New Revision: 86b14d0969ebdf51674df6d41c5e88a8d34879e8

URL: https://github.com/llvm/llvm-project/commit/86b14d0969ebdf51674df6d41c5e88a8d34879e8
DIFF: https://github.com/llvm/llvm-project/commit/86b14d0969ebdf51674df6d41c5e88a8d34879e8.diff

LOG: [mlir] Attempt to appease gcc-5 const char* -> StringLiteral conversion issu

Added: 
    

Modified: 
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index 7f4e2ffa5262..37d8d73e3dc9 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -2644,7 +2644,7 @@ static void printOpWithOffsetsSizesAndStrides(
     OpAsmPrinter &p, OpType op,
     llvm::function_ref<void(OpAsmPrinter &p, OpType op)> printExtraOperands =
         [](OpAsmPrinter &p, OpType op) {},
-    StringLiteral resultTypeKeyword = "to") {
+    StringRef resultTypeKeyword = "to") {
   int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1;
   p << op.getOperation()->getName().getStringRef().drop_front(stdDotLen) << ' ';
   p << op.source();
@@ -2677,7 +2677,7 @@ static ParseResult parseOpWithOffsetsSizesAndStrides(
     std::function<ParseResult(OpAsmParser &p,
                               OpAsmParser::OperandType &dstInfo)>
         parseExtraOperand = nullptr,
-    StringLiteral resultTypeKeyword = "to") {
+    StringRef resultTypeKeyword = "to") {
   OpAsmParser::OperandType srcInfo, dstInfo;
   SmallVector<OpAsmParser::OperandType, 4> offsetsInfo, sizesInfo, stridesInfo;
   auto indexType = parser.getBuilder().getIndexType();


        


More information about the Mlir-commits mailing list