llvm/mlir/lib/TableGen/Format.cpp

//===- Format.cpp - Utilities for String Format ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines utilities for formatting strings. They are specially
// tailored to the needs of TableGen'ing op definitions and rewrite rules,
// so they are not expected to be used as widely applicable utilities.
//
//===----------------------------------------------------------------------===//

#include "mlir/TableGen/Format.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include <cctype>

usingnamespacemlir;
usingnamespacemlir::tblgen;

// Marker to indicate an error happened when replacing a placeholder.
const char *const kMarkerForNoSubst =;

FmtContext::FmtContext(ArrayRef<std::pair<StringRef, StringRef>> subs) {}

FmtContext &FmtContext::addSubst(StringRef placeholder, const Twine &subst) {}

FmtContext &FmtContext::withBuilder(Twine subst) {}

FmtContext &FmtContext::withSelf(Twine subst) {}

std::optional<StringRef>
FmtContext::getSubstFor(FmtContext::PHKind placeholder) const {}

std::optional<StringRef> FmtContext::getSubstFor(StringRef placeholder) const {}

FmtContext::PHKind FmtContext::getPlaceHolderKind(StringRef str) {}

std::pair<FmtReplacement, StringRef>
FmtObjectBase::splitFmtSegment(StringRef fmt) {}

std::vector<FmtReplacement> FmtObjectBase::parseFormatString(StringRef fmt) {}

void FmtObjectBase::format(raw_ostream &s) const {}

FmtStrVecObject::FmtStrVecObject(StringRef fmt, const FmtContext *ctx,
                                 ArrayRef<std::string> params)
    :{}

FmtStrVecObject::FmtStrVecObject(FmtStrVecObject &&that)
    :{}