[COFF] Add a bounds checking helper for iterating a coff_resource_dir_table
[llvm-core.git] / include / llvm / Object / CVDebugRecord.h
blobd41c7391f70199f1160bf5c6d06e61d4d32146ce
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_OBJECT_CVDEBUGRECORD_H
10 #define LLVM_OBJECT_CVDEBUGRECORD_H
12 #include "llvm/Support/Endian.h"
14 namespace llvm {
15 namespace OMF {
16 struct Signature {
17 enum ID : uint32_t {
18 PDB70 = 0x53445352, // RSDS
19 PDB20 = 0x3031424e, // NB10
20 CV50 = 0x3131424e, // NB11
21 CV41 = 0x3930424e, // NB09
24 support::ulittle32_t CVSignature;
25 support::ulittle32_t Offset;
29 namespace codeview {
30 struct PDB70DebugInfo {
31 support::ulittle32_t CVSignature;
32 uint8_t Signature[16];
33 support::ulittle32_t Age;
34 // char PDBFileName[];
37 struct PDB20DebugInfo {
38 support::ulittle32_t CVSignature;
39 support::ulittle32_t Offset;
40 support::ulittle32_t Signature;
41 support::ulittle32_t Age;
42 // char PDBFileName[];
45 union DebugInfo {
46 struct OMF::Signature Signature;
47 struct PDB20DebugInfo PDB20;
48 struct PDB70DebugInfo PDB70;
53 #endif