1061da546Spatrick //===- LLDBTableGenUtils.h --------------------------------------*- C++ -*-===// 2061da546Spatrick // 3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information. 5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6061da546Spatrick // 7061da546Spatrick //===----------------------------------------------------------------------===// 8061da546Spatrick 9*dda28197Spatrick #ifndef LLDB_UTILS_TABLEGEN_LLDBTABLEGENUTILS_H 10*dda28197Spatrick #define LLDB_UTILS_TABLEGEN_LLDBTABLEGENUTILS_H 11061da546Spatrick 12061da546Spatrick #include "llvm/ADT/StringRef.h" 13061da546Spatrick #include <map> 14061da546Spatrick #include <string> 15061da546Spatrick #include <vector> 16061da546Spatrick 17061da546Spatrick namespace llvm { 18061da546Spatrick class RecordKeeper; 19061da546Spatrick class Record; 20061da546Spatrick } // namespace llvm 21061da546Spatrick 22061da546Spatrick namespace lldb_private { 23061da546Spatrick 24061da546Spatrick /// Map of names to their associated records. This map also ensures that our 25061da546Spatrick /// records are sorted in a deterministic way. 26061da546Spatrick typedef std::map<std::string, std::vector<llvm::Record *>> RecordsByName; 27061da546Spatrick 28061da546Spatrick /// Return records grouped by name. 29061da546Spatrick RecordsByName getRecordsByName(std::vector<llvm::Record *> Records, 30061da546Spatrick llvm::StringRef); 31061da546Spatrick 32061da546Spatrick } // namespace lldb_private 33061da546Spatrick 34061da546Spatrick #endif 35