CVDebugRecord.h revision d111c7844ec26448764ced627e153f406d730c5f
1//===- CVDebugRecord.h ------------------------------------------*- 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
9#ifndef LLVM_OBJECT_CVDEBUGRECORD_H
10#define LLVM_OBJECT_CVDEBUGRECORD_H
11
12#include "llvm/Support/Endian.h"
13
14namespace llvm {
15namespace OMF {
16struct Signature {
17  enum ID : uint32_t {
18    PDB70 = 0x53445352, // RSDS
19    PDB20 = 0x3031424e, // NB10
20    CV50 = 0x3131424e,  // NB11
21    CV41 = 0x3930424e,  // NB09
22  };
23
24  support::ulittle32_t CVSignature;
25  support::ulittle32_t Offset;
26};
27}
28
29namespace codeview {
30struct PDB70DebugInfo {
31  support::ulittle32_t CVSignature;
32  uint8_t Signature[16];
33  support::ulittle32_t Age;
34  // char PDBFileName[];
35};
36
37struct PDB20DebugInfo {
38  support::ulittle32_t CVSignature;
39  support::ulittle32_t Offset;
40  support::ulittle32_t Signature;
41  support::ulittle32_t Age;
42  // char PDBFileName[];
43};
44
45union DebugInfo {
46  struct OMF::Signature Signature;
47  struct PDB20DebugInfo PDB20;
48  struct PDB70DebugInfo PDB70;
49};
50}
51}
52
53#endif
54
55