SBCompileUnit.h revision 538eb82a89a68dbc57251915080bd5152b333978
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#ifndef SWIG 29 const lldb::SBCompileUnit & 30 operator = (const lldb::SBCompileUnit &rhs); 31#endif 32 33 bool 34 IsValid () const; 35 36 lldb::SBFileSpec 37 GetFileSpec () const; 38 39 uint32_t 40 GetNumLineEntries () const; 41 42 lldb::SBLineEntry 43 GetLineEntryAtIndex (uint32_t idx) const; 44 45 uint32_t 46 FindLineEntryIndex (uint32_t start_idx, 47 uint32_t line, 48 lldb::SBFileSpec *inline_file_spec) const; 49 50#ifndef SWIG 51 52 bool 53 operator == (const lldb::SBCompileUnit &rhs) const; 54 55 bool 56 operator != (const lldb::SBCompileUnit &rhs) const; 57 58#endif 59 60 bool 61 GetDescription (lldb::SBStream &description); 62 63private: 64 friend class SBFrame; 65 friend class SBSymbolContext; 66 67 SBCompileUnit (lldb_private::CompileUnit *lldb_object_ptr); 68 69#ifndef SWIG 70 71 const lldb_private::CompileUnit * 72 operator->() const; 73 74 const lldb_private::CompileUnit & 75 operator*() const; 76 77 const lldb_private::CompileUnit * 78 get () const; 79 80#endif 81 82 lldb_private::CompileUnit *m_opaque_ptr; 83}; 84 85 86} // namespace lldb 87 88#endif // LLDB_SBCompileUnit_h_ 89