brintos

brintos / llvm-project-archived public Read only

0
0
Text · 894 B · bc3e8eb Raw
26 lines · c
1//===- Utils.h - Common Utilities -------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_UTILS_TABLEGEN_COMMON_UTILS_H10#define LLVM_UTILS_TABLEGEN_COMMON_UTILS_H11 12#include "llvm/ADT/ArrayRef.h"13#include "llvm/ADT/StringRef.h"14 15namespace llvm {16class Record;17 18/// Sort an array of Records on the "Name" field, and check for records with19/// duplicate "Name" field. If duplicates are found, report a fatal error.20void sortAndReportDuplicates(MutableArrayRef<const Record *> Records,21                             StringRef ObjectName);22 23} // namespace llvm24 25#endif // LLVM_UTILS_TABLEGEN_COMMON_UTILS_H26