blob: bc3e8eb16cf06d8c640cbe5a40a671c1884723b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//===- 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
|