LLVM  3.7.0
DWARFDebugAbbrev.h
Go to the documentation of this file.
1 //===-- DWARFDebugAbbrev.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_DWARFDEBUGABBREV_H
11 #define LLVM_LIB_DEBUGINFO_DWARFDEBUGABBREV_H
12 
14 #include <list>
15 #include <map>
16 #include <vector>
17 
18 namespace llvm {
19 
21  uint32_t Offset;
22  /// Code of the first abbreviation, if all abbreviations in the set have
23  /// consecutive codes. UINT32_MAX otherwise.
24  uint32_t FirstAbbrCode;
25  std::vector<DWARFAbbreviationDeclaration> Decls;
26 
27 public:
29 
30  uint32_t getOffset() const { return Offset; }
31  void dump(raw_ostream &OS) const;
32  bool extract(DataExtractor Data, uint32_t *OffsetPtr);
33 
35  getAbbreviationDeclaration(uint32_t AbbrCode) const;
36 
37 private:
38  void clear();
39 };
40 
42  typedef std::map<uint64_t, DWARFAbbreviationDeclarationSet>
43  DWARFAbbreviationDeclarationSetMap;
44 
45  DWARFAbbreviationDeclarationSetMap AbbrDeclSets;
46  mutable DWARFAbbreviationDeclarationSetMap::const_iterator PrevAbbrOffsetPos;
47 
48 public:
50 
52  getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const;
53 
54  void dump(raw_ostream &OS) const;
56 
57 private:
58  void clear();
59 };
60 
61 }
62 
63 #endif
void extract(DataExtractor Data)
bool extract(DataExtractor Data, uint32_t *OffsetPtr)
const DWARFAbbreviationDeclarationSet * getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const
void dump(raw_ostream &OS) const
const DWARFAbbreviationDeclaration * getAbbreviationDeclaration(uint32_t AbbrCode) const
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