LLDB mainline
RegisterType.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11using namespace lldb_private;
12
14 Stream &strm, std::unordered_set<const RegisterType *> &previously_emitted,
15 const RegisterType *user) const {
16 // If we already emitted this, don't emit it again.
17 if (!previously_emitted.insert(this).second)
18 return;
19
20 // Emit this type's dependencies first.
21 for (auto dep : m_dependencies)
22 dep->ToXML(strm, previously_emitted, this);
23
24 // Finally emit this type.
25 ToXMLElement(strm, user);
26}
void ToXML(Stream &strm, std::unordered_set< const RegisterType * > &previously_emitted, const RegisterType *user=nullptr) const
Output XML that describes this type, to be inserted into a target XML file.
virtual void ToXMLElement(Stream &strm, const RegisterType *user=nullptr) const =0
Output the register type as an XML element.
std::vector< const RegisterType * > m_dependencies
RegisterType(RegisterTypeKind kind, std::string id)
A stream class that can stream formatted output to a file.
Definition Stream.h:28
A class that represents a running process on the host machine.