LLVM 19.0.0git
NativeTypeArray.cpp
Go to the documentation of this file.
1//===- NativeTypeArray.cpp - info about arrays ------------------*- 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-exception
6//
7//===----------------------------------------------------------------------===//
8
10
15
16using namespace llvm;
17using namespace llvm::codeview;
18using namespace llvm::pdb;
19
24 Index(TI) {}
26
28 PdbSymbolIdField ShowIdFields,
29 PdbSymbolIdField RecurseIdFields) const {
30 NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
31
32 dumpSymbolField(OS, "arrayIndexTypeId", getArrayIndexTypeId(), Indent);
33 dumpSymbolIdField(OS, "elementTypeId", getTypeId(), Indent, Session,
34 PdbSymbolIdField::Type, ShowIdFields, RecurseIdFields);
35
36 dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session,
38 RecurseIdFields);
39 dumpSymbolField(OS, "length", getLength(), Indent);
40 dumpSymbolField(OS, "count", getCount(), Indent);
41 dumpSymbolField(OS, "constType", isConstType(), Indent);
42 dumpSymbolField(OS, "unalignedType", isUnalignedType(), Indent);
43 dumpSymbolField(OS, "volatileType", isVolatileType(), Indent);
44}
45
47 return Session.getSymbolCache().findSymbolByTypeIndex(Record.getIndexType());
48}
49
50bool NativeTypeArray::isConstType() const { return false; }
51
52bool NativeTypeArray::isUnalignedType() const { return false; }
53
54bool NativeTypeArray::isVolatileType() const { return false; }
55
57 NativeRawSymbol &Element =
59 return getLength() / Element.getLength();
60}
61
64 Record.getElementType());
65}
66
raw_pwrite_stream & OS
Class to represent array types.
Definition: DerivedTypes.h:371
A 32-bit type reference.
Definition: TypeIndex.h:96
uint64_t getLength() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
SymbolCache & getSymbolCache()
bool isVolatileType() const override
bool isUnalignedType() const override
uint64_t getLength() const override
bool isConstType() const override
SymIndexId getArrayIndexTypeId() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
uint32_t getCount() const override
SymIndexId getTypeId() const override
NativeTypeArray(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI, codeview::ArrayRecord Record)
SymIndexId findSymbolByTypeIndex(codeview::TypeIndex TI) const
NativeRawSymbol & getNativeSymbolById(SymIndexId SymbolId) const
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:47
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:202
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18