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