LLVM  3.7.0
DWARFAcceleratorTable.h
Go to the documentation of this file.
1 //===--- DWARFAcceleratorTable.h --------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H
11 #define LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H
12 
13 #include "llvm/ADT/SmallVector.h"
16 #include <cstdint>
17 
18 namespace llvm {
19 
21 
22  struct Header {
23  uint32_t Magic;
24  uint16_t Version;
25  uint16_t HashFunction;
26  uint32_t NumBuckets;
27  uint32_t NumHashes;
28  uint32_t HeaderDataLength;
29  };
30 
31  struct HeaderData {
32  typedef uint16_t AtomType;
33  typedef uint16_t Form;
34  uint32_t DIEOffsetBase;
36  };
37 
38  struct Header Hdr;
39  struct HeaderData HdrData;
40  DataExtractor AccelSection;
41  DataExtractor StringSection;
42  const RelocAddrMap& Relocs;
43 public:
44  DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection,
45  const RelocAddrMap &Relocs)
46  : AccelSection(AccelSection), StringSection(StringSection), Relocs(Relocs) {}
47 
48  bool extract();
49  void dump(raw_ostream &OS) const;
50 };
51 
52 }
53 
54 #endif
DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection, const RelocAddrMap &Relocs)
static const char *const Magic
Definition: Archive.cpp:26
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:861
void dump(raw_ostream &OS) const
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:38