diff options
author | 2020-08-03 14:33:06 +0000 | |
---|---|---|
committer | 2020-08-03 14:33:06 +0000 | |
commit | 061da546b983eb767bad15e67af1174fb0bcf31c (patch) | |
tree | 83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp | |
parent | Import LLVM 10.0.0 release including clang, lld and lldb. (diff) | |
download | wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip |
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom
tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp')
-rw-r--r-- | gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp b/gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp new file mode 100644 index 00000000000..8b4c7581c98 --- /dev/null +++ b/gnu/llvm/lldb/utils/TableGen/LLDBTableGenUtils.cpp @@ -0,0 +1,21 @@ +//===- LLDBTableGenUtils.cpp ----------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#include "LLDBTableGenUtils.h" +#include "llvm/TableGen/Record.h" + +using namespace llvm; +using namespace lldb_private; + +RecordsByName lldb_private::getRecordsByName(std::vector<Record *> Records, + StringRef Name) { + RecordsByName Result; + for (Record *R : Records) + Result[R->getValueAsString(Name).str()].push_back(R); + return Result; +} |