aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm14/include/llvm/DebugInfo/PDB/Native/RawConstants.h
blob: cf9d9dde64fa48f6395e9b2079789e9ba921e297 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#pragma once

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

//===- RawConstants.h -------------------------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_DEBUGINFO_PDB_NATIVE_RAWCONSTANTS_H
#define LLVM_DEBUGINFO_PDB_NATIVE_RAWCONSTANTS_H

#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include <cstdint>

namespace llvm {
namespace pdb {

const uint16_t kInvalidStreamIndex = 0xFFFF;

enum PdbRaw_ImplVer : uint32_t {
  PdbImplVC2 = 19941610,
  PdbImplVC4 = 19950623,
  PdbImplVC41 = 19950814,
  PdbImplVC50 = 19960307,
  PdbImplVC98 = 19970604,
  PdbImplVC70Dep = 19990604, // deprecated
  PdbImplVC70 = 20000404,
  PdbImplVC80 = 20030901,
  PdbImplVC110 = 20091201,
  PdbImplVC140 = 20140508,
};

enum class PdbRaw_SrcHeaderBlockVer : uint32_t { SrcVerOne = 19980827 };

enum class PdbRaw_FeatureSig : uint32_t {
  VC110 = PdbImplVC110,
  VC140 = PdbImplVC140,
  NoTypeMerge = 0x4D544F4E,
  MinimalDebugInfo = 0x494E494D,
};

enum PdbRaw_Features : uint32_t {
  PdbFeatureNone = 0x0,
  PdbFeatureContainsIdStream = 0x1,
  PdbFeatureMinimalDebugInfo = 0x2,
  PdbFeatureNoTypeMerging = 0x4,
  LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ PdbFeatureNoTypeMerging)
};

enum PdbRaw_DbiVer : uint32_t {
  PdbDbiVC41 = 930803,
  PdbDbiV50 = 19960307,
  PdbDbiV60 = 19970606,
  PdbDbiV70 = 19990903,
  PdbDbiV110 = 20091201
};

enum PdbRaw_TpiVer : uint32_t {
  PdbTpiV40 = 19950410,
  PdbTpiV41 = 19951122,
  PdbTpiV50 = 19961031,
  PdbTpiV70 = 19990903,
  PdbTpiV80 = 20040203,
};

enum PdbRaw_DbiSecContribVer : uint32_t {
  DbiSecContribVer60 = 0xeffe0000 + 19970605,
  DbiSecContribV2 = 0xeffe0000 + 20140516
};

enum SpecialStream : uint32_t {
  // Stream 0 contains the copy of previous version of the MSF directory.
  // We are not currently using it, but technically if we find the main
  // MSF is corrupted, we could fallback to it.
  OldMSFDirectory = 0,

  StreamPDB = 1,
  StreamTPI = 2,
  StreamDBI = 3,
  StreamIPI = 4,

  kSpecialStreamCount
};

enum class DbgHeaderType : uint16_t {
  FPO,
  Exception,
  Fixup,
  OmapToSrc,
  OmapFromSrc,
  SectionHdr,
  TokenRidMap,
  Xdata,
  Pdata,
  NewFPO,
  SectionHdrOrig,
  Max
};

enum class OMFSegDescFlags : uint16_t {
  None = 0,
  Read = 1 << 0,              // Segment is readable.
  Write = 1 << 1,             // Segment is writable.
  Execute = 1 << 2,           // Segment is executable.
  AddressIs32Bit = 1 << 3,    // Descriptor describes a 32-bit linear address.
  IsSelector = 1 << 8,        // Frame represents a selector.
  IsAbsoluteAddress = 1 << 9, // Frame represents an absolute address.
  IsGroup = 1 << 10,          // If set, descriptor represents a group.
  LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ IsGroup)
};

LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();

} // end namespace pdb
} // end namespace llvm

#endif // LLVM_DEBUGINFO_PDB_NATIVE_RAWCONSTANTS_H

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif