1 //===-- DWARFDebugAbbrev.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_DWARFDEBUGABBREV_H
11 #define LLVM_DEBUGINFO_DWARFDEBUGABBREV_H
13 #include "DWARFAbbreviationDeclaration.h"
20 class DWARFAbbreviationDeclarationSet {
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;
28 DWARFAbbreviationDeclarationSet();
30 uint32_t getOffset() const { return Offset; }
31 void dump(raw_ostream &OS) const;
32 bool extract(DataExtractor Data, uint32_t *OffsetPtr);
34 const DWARFAbbreviationDeclaration *
35 getAbbreviationDeclaration(uint32_t AbbrCode) const;
41 class DWARFDebugAbbrev {
42 typedef std::map<uint64_t, DWARFAbbreviationDeclarationSet>
43 DWARFAbbreviationDeclarationSetMap;
45 DWARFAbbreviationDeclarationSetMap AbbrDeclSets;
46 mutable DWARFAbbreviationDeclarationSetMap::const_iterator PrevAbbrOffsetPos;
51 const DWARFAbbreviationDeclarationSet *
52 getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const;
54 void dump(raw_ostream &OS) const;
55 void extract(DataExtractor Data);