Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:41

0001 //===-- SBCompileUnit.h -----------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_API_SBCOMPILEUNIT_H
0010 #define LLDB_API_SBCOMPILEUNIT_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 #include "lldb/API/SBFileSpec.h"
0014 
0015 namespace lldb {
0016 
0017 class LLDB_API SBCompileUnit {
0018 public:
0019   SBCompileUnit();
0020 
0021   SBCompileUnit(const lldb::SBCompileUnit &rhs);
0022 
0023   ~SBCompileUnit();
0024 
0025   const lldb::SBCompileUnit &operator=(const lldb::SBCompileUnit &rhs);
0026 
0027   explicit operator bool() const;
0028 
0029   bool IsValid() const;
0030 
0031   lldb::SBFileSpec GetFileSpec() const;
0032 
0033   uint32_t GetNumLineEntries() const;
0034 
0035   lldb::SBLineEntry GetLineEntryAtIndex(uint32_t idx) const;
0036 
0037   uint32_t FindLineEntryIndex(lldb::SBLineEntry &line_entry,
0038                               bool exact = false) const;
0039 
0040   uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
0041                               lldb::SBFileSpec *inline_file_spec) const;
0042 
0043   uint32_t FindLineEntryIndex(uint32_t start_idx, uint32_t line,
0044                               lldb::SBFileSpec *inline_file_spec,
0045                               bool exact) const;
0046 
0047   SBFileSpec GetSupportFileAtIndex(uint32_t idx) const;
0048 
0049   uint32_t GetNumSupportFiles() const;
0050 
0051   uint32_t FindSupportFileIndex(uint32_t start_idx, const SBFileSpec &sb_file,
0052                                 bool full);
0053 
0054   /// Get all types matching \a type_mask from debug info in this
0055   /// compile unit.
0056   ///
0057   /// \param[in] type_mask
0058   ///    A bitfield that consists of one or more bits logically OR'ed
0059   ///    together from the lldb::TypeClass enumeration. This allows
0060   ///    you to request only structure types, or only class, struct
0061   ///    and union types. Passing in lldb::eTypeClassAny will return
0062   ///    all types found in the debug information for this compile
0063   ///    unit.
0064   ///
0065   /// \return
0066   ///    A list of types in this compile unit that match \a type_mask
0067   lldb::SBTypeList GetTypes(uint32_t type_mask = lldb::eTypeClassAny);
0068 
0069   lldb::LanguageType GetLanguage();
0070 
0071   bool operator==(const lldb::SBCompileUnit &rhs) const;
0072 
0073   bool operator!=(const lldb::SBCompileUnit &rhs) const;
0074 
0075   bool GetDescription(lldb::SBStream &description);
0076 
0077 private:
0078   friend class SBAddress;
0079   friend class SBFrame;
0080   friend class SBSymbolContext;
0081   friend class SBModule;
0082 
0083   SBCompileUnit(lldb_private::CompileUnit *lldb_object_ptr);
0084 
0085   const lldb_private::CompileUnit *operator->() const;
0086 
0087   const lldb_private::CompileUnit &operator*() const;
0088 
0089   lldb_private::CompileUnit *get();
0090 
0091   void reset(lldb_private::CompileUnit *lldb_object_ptr);
0092 
0093   lldb_private::CompileUnit *m_opaque_ptr = nullptr;
0094 };
0095 
0096 } // namespace lldb
0097 
0098 #endif // LLDB_API_SBCOMPILEUNIT_H