[mlir] Attempt to appease gcc-5 const char* -> StringLiteral conversion issu
authorNicolas Vasilache <ntv@google.com>
Fri, 2 Oct 2020 14:02:53 +0000 (10:02 -0400)
committerNicolas Vasilache <ntv@google.com>
Fri, 2 Oct 2020 14:53:48 +0000 (10:53 -0400)
mlir/lib/Dialect/StandardOps/IR/Ops.cpp

index 7f4e2ff..37d8d73 100644 (file)
@@ -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();