LLVM  4.0.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 "llvm/Support/Dwarf.h"
17 #include <cstdint>
18 
19 namespace llvm {
20 
22 
23  struct Header {
25  uint16_t Version;
26  uint16_t HashFunction;
27  uint32_t NumBuckets;
28  uint32_t NumHashes;
29  uint32_t HeaderDataLength;
30  };
31 
32  struct HeaderData {
33  typedef uint16_t AtomType;
34  typedef dwarf::Form Form;
35  uint32_t DIEOffsetBase;
37  };
38 
39  struct Header Hdr;
40  struct HeaderData HdrData;
41  DataExtractor AccelSection;
42  DataExtractor StringSection;
43  const RelocAddrMap& Relocs;
44 public:
45  DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection,
46  const RelocAddrMap &Relocs)
47  : AccelSection(AccelSection), StringSection(StringSection), Relocs(Relocs) {}
48 
49  bool extract();
50  void dump(raw_ostream &OS) const;
51 };
52 
53 }
54 
55 #endif
DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection, const RelocAddrMap &Relocs)
static const char *const Magic
Definition: Archive.cpp:25
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:843
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:44
const uint64_t Version
Definition: InstrProf.h:799