Rahul Joshi 3ae71d154e
[LLVM][TableGen] Change CodeGenSchedule to use const RecordKeeper (#108617)
Change CodeGenSchedule to use const RecordKeeper.

This is a part of effort to have better const correctness in TableGen
backends:


https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-15 04:55:29 -07:00

26 lines
894 B
C++

//===- Utils.h - Common Utilities -------------------------------*- 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
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_UTILS_TABLEGEN_COMMON_UTILS_H
#define LLVM_UTILS_TABLEGEN_COMMON_UTILS_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
namespace llvm {
class Record;
/// Sort an array of Records on the "Name" field, and check for records with
/// duplicate "Name" field. If duplicates are found, report a fatal error.
void sortAndReportDuplicates(MutableArrayRef<const Record *> Records,
StringRef ObjectName);
} // namespace llvm
#endif // LLVM_UTILS_TABLEGEN_COMMON_UTILS_H