1 //===-- SBCompileUnit.h -----------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SBCompileUnit_h_
10 #define LLDB_SBCompileUnit_h_
12 #include "lldb/API/SBDefines.h"
13 #include "lldb/API/SBFileSpec.h"
17 class LLDB_API SBCompileUnit {
21 SBCompileUnit(const lldb::SBCompileUnit &rhs);
25 const lldb::SBCompileUnit &operator=(const lldb::SBCompileUnit &rhs);
27 explicit operator bool() const;
31 lldb::SBFileSpec GetFileSpec() const;
33 uint32_t GetNumLineEntries() const;
35 lldb::SBLineEntry GetLineEntryAtIndex(uint32_t idx) const;
37 uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
38 lldb::SBFileSpec *inline_file_spec) const;
40 uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
41 lldb::SBFileSpec *inline_file_spec,
44 SBFileSpec GetSupportFileAtIndex(uint32_t idx) const;
46 uint32_t GetNumSupportFiles() const;
48 uint32_t FindSupportFileIndex(uint32_t start_idx, const SBFileSpec &sb_file,
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 lldb::SBTypeList GetTypes(uint32_t type_mask = lldb::eTypeClassAny);
66 lldb::LanguageType GetLanguage();
68 bool operator==(const lldb::SBCompileUnit &rhs) const;
70 bool operator!=(const lldb::SBCompileUnit &rhs) const;
72 bool GetDescription(lldb::SBStream &description);
75 friend class SBAddress;
77 friend class SBSymbolContext;
78 friend class SBModule;
80 SBCompileUnit(lldb_private::CompileUnit *lldb_object_ptr);
82 const lldb_private::CompileUnit *operator->() const;
84 const lldb_private::CompileUnit &operator*() const;
86 lldb_private::CompileUnit *get();
88 void reset(lldb_private::CompileUnit *lldb_object_ptr);
90 lldb_private::CompileUnit *m_opaque_ptr;
95 #endif // LLDB_SBCompileUnit_h_