1 //===-- DIERef.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 SymbolFileDWARF_DIERef_h_
11 #define SymbolFileDWARF_DIERef_h_
13 #include "lldb/Core/dwarf.h"
14 #include "lldb/lldb-defines.h"
17 class SymbolFileDWARF;
23 DIERef(dw_offset_t c, dw_offset_t d);
25 //----------------------------------------------------------------------
26 // In order to properly decode a lldb::user_id_t back into a DIERef we
27 // need the DWARF file since it knows if DWARF in .o files is being used
28 // (MacOSX) or if DWO files are being used. The encoding of the user ID
29 // differs between the two types of DWARF.
30 //----------------------------------------------------------------------
32 DIERef(lldb::user_id_t uid, SymbolFileDWARF *dwarf);
35 DIERef(const DWARFFormValue& form_value);
37 //----------------------------------------------------------------------
38 // In order to properly encode a DIERef unto a lldb::user_id_t we need
39 // the DWARF file since it knows if DWARF in .o files is being used
40 // (MacOSX) or if DWO files are being used. The encoding of the user ID
41 // differs between the two types of DWARF.
42 //----------------------------------------------------------------------
44 GetUID(SymbolFileDWARF *dwarf) const;
47 operator< (const DIERef &ref) const
49 return die_offset < ref.die_offset;
53 operator< (const DIERef &ref)
55 return die_offset < ref.die_offset;
58 dw_offset_t cu_offset;
59 dw_offset_t die_offset;
62 typedef std::vector<DIERef> DIEArray;
64 #endif // SymbolFileDWARF_DIERef_h_