LLVM 24.0.0git
NativeTypeTypedefAlias.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
12
13using namespace llvm;
14using namespace llvm::codeview;
15using namespace llvm::pdb;
16
23
29
31
33 PdbSymbolIdField ShowIdFields,
34 PdbSymbolIdField RecurseIdFields) const {
35 NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
36 dumpSymbolField(OS, "name", getName(), Indent);
37 dumpSymbolIdField(OS, "typeId", getTypeId(), Indent, Session,
38 PdbSymbolIdField::Type, ShowIdFields, RecurseIdFields);
39 dumpSymbolField(OS, "constType", isConstType(), Indent);
40 dumpSymbolField(OS, "unalignedType", isUnalignedType(), Indent);
41 dumpSymbolField(OS, "volatileType", isVolatileType(), Indent);
42}
43
46 return UnmodifiedType->getName();
47 return std::string(Record.Name);
48}
49
52 return UnmodifiedType->getTypeId();
53
54 return Session.getSymbolCache().findSymbolByTypeIndex(Record.UnderlyingType);
55}
56
59 return UnmodifiedType->getSymIndexId();
60
61 return 0;
62}
63
65 if (!Modifiers)
66 return false;
67 return (Modifiers->Modifiers & ModifierOptions::Const) !=
69}
70
72 if (!Modifiers)
73 return false;
74 return (Modifiers->Modifiers & ModifierOptions::Unaligned) !=
76}
77
79 if (!Modifiers)
80 return false;
81 return (Modifiers->Modifiers & ModifierOptions::Volatile) !=
83}
LF_ALIAS - A typedef where Name is typedef'd to UnderlyingType.
Definition TypeRecord.h:968
A 32-bit type reference.
Definition TypeIndex.h:97
NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, SymIndexId SymbolId)
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
NativeTypeTypedefAlias(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI, codeview::AliasRecord Typedef)
SymIndexId getUnmodifiedTypeId() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
std::optional< codeview::ModifierRecord > Modifiers
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
uint32_t SymIndexId
Definition PDBTypes.h:26
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition PDBExtras.h:51
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition PDBTypes.h:245
LLVM_ABI void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1933
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:879