1 //===- NativeTypeBuiltin.cpp -------------------------------------- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h"
10 #include "llvm/Support/FormatVariadic.h"
13 using namespace llvm::codeview
;
14 using namespace llvm::pdb
;
16 NativeTypeBuiltin::NativeTypeBuiltin(NativeSession
&PDBSession
, SymIndexId Id
,
17 ModifierOptions Mods
, PDB_BuiltinType T
,
19 : NativeRawSymbol(PDBSession
, PDB_SymType::BuiltinType
, Id
),
20 Session(PDBSession
), Mods(Mods
), Type(T
), Length(L
) {}
22 NativeTypeBuiltin::~NativeTypeBuiltin() {}
24 void NativeTypeBuiltin::dump(raw_ostream
&OS
, int Indent
,
25 PdbSymbolIdField ShowIdFields
,
26 PdbSymbolIdField RecurseIdFields
) const {}
28 PDB_SymType
NativeTypeBuiltin::getSymTag() const {
29 return PDB_SymType::BuiltinType
;
32 PDB_BuiltinType
NativeTypeBuiltin::getBuiltinType() const { return Type
; }
34 bool NativeTypeBuiltin::isConstType() const {
35 return (Mods
& ModifierOptions::Const
) != ModifierOptions::None
;
38 uint64_t NativeTypeBuiltin::getLength() const { return Length
; }
40 bool NativeTypeBuiltin::isUnalignedType() const {
41 return (Mods
& ModifierOptions::Unaligned
) != ModifierOptions::None
;
44 bool NativeTypeBuiltin::isVolatileType() const {
45 return (Mods
& ModifierOptions::Volatile
) != ModifierOptions::None
;