llvm/llvm/lib/IR/SymbolTableListTraitsImpl.h

//===-- llvm/SymbolTableListTraitsImpl.h - Implementation ------*- C++ -*--===//
//
// 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 implements the stickier parts of the SymbolTableListTraits class,
// and is explicitly instantiated where needed to avoid defining all this code
// in a widely used header.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_IR_SYMBOLTABLELISTTRAITSIMPL_H
#define LLVM_LIB_IR_SYMBOLTABLELISTTRAITSIMPL_H

#include "llvm/IR/SymbolTableListTraits.h"
#include "llvm/IR/ValueSymbolTable.h"

namespace llvm {

/// Notify basic blocks when an instruction is inserted.
template <typename ParentClass>
inline void invalidateParentIListOrdering(ParentClass *Parent) {}
template <> void invalidateParentIListOrdering(BasicBlock *BB);

/// setSymTabObject - This is called when (f.e.) the parent of a basic block
/// changes.  This requires us to remove all the instruction symtab entries from
/// the current function and reinsert them into the new function.
template <typename ValueSubClass, typename... Args>
template <typename TPtr>
void SymbolTableListTraits<ValueSubClass, Args...>::setSymTabObject(TPtr *Dest,
                                                                    TPtr Src) {}

template <typename ValueSubClass, typename... Args>
void SymbolTableListTraits<ValueSubClass, Args...>::addNodeToList(
    ValueSubClass *V) {}

template <typename ValueSubClass, typename... Args>
void SymbolTableListTraits<ValueSubClass, Args...>::removeNodeFromList(
    ValueSubClass *V) {}

template <typename ValueSubClass, typename... Args>
void SymbolTableListTraits<ValueSubClass, Args...>::transferNodesFromList(
    SymbolTableListTraits &L2, iterator first, iterator last) {}

} // End llvm namespace

#endif