SBCompileUnit.h revision 7dd5c51fbab8384b18f20ecc125f9a1bb3c9bcb2
1//===-- SBCompileUnit.h -----------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LLDB_SBCompileUnit_h_ 11#define LLDB_SBCompileUnit_h_ 12 13#include "lldb/API/SBDefines.h" 14#include "lldb/API/SBFileSpec.h" 15 16namespace lldb { 17 18class SBCompileUnit 19{ 20public: 21 22 SBCompileUnit (); 23 24 SBCompileUnit (const lldb::SBCompileUnit &rhs); 25 26 ~SBCompileUnit (); 27 28 const lldb::SBCompileUnit & 29 operator = (const lldb::SBCompileUnit &rhs); 30 31 bool 32 IsValid () const; 33 34 lldb::SBFileSpec 35 GetFileSpec () const; 36 37 uint32_t 38 GetNumLineEntries () const; 39 40 lldb::SBLineEntry 41 GetLineEntryAtIndex (uint32_t idx) const; 42 43 uint32_t 44 FindLineEntryIndex (uint32_t start_idx, 45 uint32_t line, 46 lldb::SBFileSpec *inline_file_spec) const; 47 48 uint32_t 49 FindLineEntryIndex (uint32_t start_idx, 50 uint32_t line, 51 lldb::SBFileSpec *inline_file_spec, 52 bool exact) const; 53 54 bool 55 operator == (const lldb::SBCompileUnit &rhs) const; 56 57 bool 58 operator != (const lldb::SBCompileUnit &rhs) const; 59 60 bool 61 GetDescription (lldb::SBStream &description); 62 63private: 64 friend class SBAddress; 65 friend class SBFrame; 66 friend class SBSymbolContext; 67 68 SBCompileUnit (lldb_private::CompileUnit *lldb_object_ptr); 69 70 const lldb_private::CompileUnit * 71 operator->() const; 72 73 const lldb_private::CompileUnit & 74 operator*() const; 75 76 lldb_private::CompileUnit * 77 get (); 78 79 void 80 reset (lldb_private::CompileUnit *lldb_object_ptr); 81 82 lldb_private::CompileUnit *m_opaque_ptr; 83}; 84 85 86} // namespace lldb 87 88#endif // LLDB_SBCompileUnit_h_ 89