1 //===-- SBCompileUnit.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 LLDB_SBCompileUnit_h_
11 #define LLDB_SBCompileUnit_h_
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBFileSpec.h"
18 class LLDB_API SBCompileUnit {
22 SBCompileUnit(const lldb::SBCompileUnit &rhs);
26 const lldb::SBCompileUnit &operator=(const lldb::SBCompileUnit &rhs);
30 lldb::SBFileSpec GetFileSpec() const;
32 uint32_t GetNumLineEntries() const;
34 lldb::SBLineEntry GetLineEntryAtIndex(uint32_t idx) const;
36 uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
37 lldb::SBFileSpec *inline_file_spec) const;
39 uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
40 lldb::SBFileSpec *inline_file_spec,
43 SBFileSpec GetSupportFileAtIndex(uint32_t idx) const;
45 uint32_t GetNumSupportFiles() const;
47 uint32_t FindSupportFileIndex(uint32_t start_idx, const SBFileSpec &sb_file,
50 //------------------------------------------------------------------
51 /// Get all types matching \a type_mask from debug info in this
54 /// @param[in] type_mask
55 /// A bitfield that consists of one or more bits logically OR'ed
56 /// together from the lldb::TypeClass enumeration. This allows
57 /// you to request only structure types, or only class, struct
58 /// and union types. Passing in lldb::eTypeClassAny will return
59 /// all types found in the debug information for this compile
63 /// A list of types in this compile unit that match \a type_mask
64 //------------------------------------------------------------------
65 lldb::SBTypeList GetTypes(uint32_t type_mask = lldb::eTypeClassAny);
67 lldb::LanguageType GetLanguage();
69 bool operator==(const lldb::SBCompileUnit &rhs) const;
71 bool operator!=(const lldb::SBCompileUnit &rhs) const;
73 bool GetDescription(lldb::SBStream &description);
76 friend class SBAddress;
78 friend class SBSymbolContext;
79 friend class SBModule;
81 SBCompileUnit(lldb_private::CompileUnit *lldb_object_ptr);
83 const lldb_private::CompileUnit *operator->() const;
85 const lldb_private::CompileUnit &operator*() const;
87 lldb_private::CompileUnit *get();
89 void reset(lldb_private::CompileUnit *lldb_object_ptr);
91 lldb_private::CompileUnit *m_opaque_ptr;
96 #endif // LLDB_SBCompileUnit_h_