llvm/mlir/lib/IR/AttrTypeSubElements.cpp

//===- AttrTypeSubElements.cpp - Attr and Type SubElement Interfaces ------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "mlir/IR/Operation.h"
#include <optional>

usingnamespacemlir;

//===----------------------------------------------------------------------===//
// AttrTypeWalker
//===----------------------------------------------------------------------===//

WalkResult AttrTypeWalker::walkImpl(Attribute attr, WalkOrder order) {}
WalkResult AttrTypeWalker::walkImpl(Type type, WalkOrder order) {}

template <typename T, typename WalkFns>
WalkResult AttrTypeWalker::walkImpl(T element, WalkFns &walkFns,
                                    WalkOrder order) {}

template <typename T>
WalkResult AttrTypeWalker::walkSubElements(T interface, WalkOrder order) {}

//===----------------------------------------------------------------------===//
/// AttrTypeReplacerBase
//===----------------------------------------------------------------------===//

template <typename Concrete>
void detail::AttrTypeReplacerBase<Concrete>::addReplacement(
    ReplaceFn<Attribute> fn) {}

template <typename Concrete>
void detail::AttrTypeReplacerBase<Concrete>::addReplacement(
    ReplaceFn<Type> fn) {}

template <typename Concrete>
void detail::AttrTypeReplacerBase<Concrete>::replaceElementsIn(
    Operation *op, bool replaceAttrs, bool replaceLocs, bool replaceTypes) {}

template <typename Concrete>
void detail::AttrTypeReplacerBase<Concrete>::recursivelyReplaceElementsIn(
    Operation *op, bool replaceAttrs, bool replaceLocs, bool replaceTypes) {}

template <typename T, typename Replacer>
static void updateSubElementImpl(T element, Replacer &replacer,
                                 SmallVectorImpl<T> &newElements,
                                 FailureOr<bool> &changed) {}

template <typename T, typename Replacer>
static T replaceSubElements(T interface, Replacer &replacer) {}

/// Shared implementation of replacing a given attribute or type element.
template <typename T, typename ReplaceFns, typename Replacer>
static T replaceElementImpl(T element, ReplaceFns &replaceFns,
                            Replacer &replacer) {}

template <typename Concrete>
Attribute detail::AttrTypeReplacerBase<Concrete>::replaceBase(Attribute attr) {}

template <typename Concrete>
Type detail::AttrTypeReplacerBase<Concrete>::replaceBase(Type type) {}

//===----------------------------------------------------------------------===//
/// AttrTypeReplacer
//===----------------------------------------------------------------------===//

template class detail::AttrTypeReplacerBase<AttrTypeReplacer>;

template <typename T>
T AttrTypeReplacer::cachedReplaceImpl(T element) {}

Attribute AttrTypeReplacer::replace(Attribute attr) {}

Type AttrTypeReplacer::replace(Type type) {}

//===----------------------------------------------------------------------===//
/// CyclicAttrTypeReplacer
//===----------------------------------------------------------------------===//

template class detail::AttrTypeReplacerBase<CyclicAttrTypeReplacer>;

CyclicAttrTypeReplacer::CyclicAttrTypeReplacer()
    :{}

void CyclicAttrTypeReplacer::addCycleBreaker(CycleBreakerFn<Attribute> fn) {}

void CyclicAttrTypeReplacer::addCycleBreaker(CycleBreakerFn<Type> fn) {}

template <typename T>
T CyclicAttrTypeReplacer::cachedReplaceImpl(T element) {}

Attribute CyclicAttrTypeReplacer::replace(Attribute attr) {}

Type CyclicAttrTypeReplacer::replace(Type type) {}

std::optional<const void *>
CyclicAttrTypeReplacer::breakCycleImpl(void *element) {}

//===----------------------------------------------------------------------===//
// AttrTypeImmediateSubElementWalker
//===----------------------------------------------------------------------===//

void AttrTypeImmediateSubElementWalker::walk(Attribute element) {}

void AttrTypeImmediateSubElementWalker::walk(Type element) {}