LLDB mainline
DebugMacros.cpp
Go to the documentation of this file.
1//===-- DebugMacros.cpp ---------------------------------------------------===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
10
12
13using namespace lldb_private;
14
16 uint32_t debug_line_file_idx, const char *str)
17 : m_type(type), m_line(line), m_debug_line_file_idx(debug_line_file_idx),
18 m_str(str) {}
19
21 const DebugMacrosSP &debug_macros_sp)
22 : m_type(type), m_line(0), m_debug_line_file_idx(0),
23 m_debug_macros_sp(debug_macros_sp) {}
24
27}
28
30 const char *str) {
31 return DebugMacroEntry(DebugMacroEntry::DEFINE, line, 0, str);
32}
33
35 const char *str) {
36 return DebugMacroEntry(DebugMacroEntry::UNDEF, line, 0, str);
37}
38
41 uint32_t debug_line_file_idx) {
42 return DebugMacroEntry(DebugMacroEntry::START_FILE, line, debug_line_file_idx,
43 nullptr);
44}
45
47 return DebugMacroEntry(DebugMacroEntry::END_FILE, 0, 0, nullptr);
48}
49
52 return DebugMacroEntry(DebugMacroEntry::INDIRECT, debug_macros_sp);
53}
A class that describes a compilation unit.
Definition: CompileUnit.h:41
const SupportFileList & GetSupportFiles()
Get the compile unit's support file list.
static DebugMacroEntry CreateIndirectEntry(const DebugMacrosSP &debug_macros_sp)
Definition: DebugMacros.cpp:51
static DebugMacroEntry CreateEndFileEntry()
Definition: DebugMacros.cpp:46
static DebugMacroEntry CreateUndefEntry(uint32_t line, const char *str)
Definition: DebugMacros.cpp:34
const FileSpec & GetFileSpec(CompileUnit *comp_unit) const
Definition: DebugMacros.cpp:25
static DebugMacroEntry CreateDefineEntry(uint32_t line, const char *str)
Definition: DebugMacros.cpp:29
static DebugMacroEntry CreateStartFileEntry(uint32_t line, uint32_t debug_line_file_idx)
Definition: DebugMacros.cpp:40
A file utility class.
Definition: FileSpec.h:56
const FileSpec & GetFileSpecAtIndex(size_t idx) const
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< DebugMacros > DebugMacrosSP
Definition: DebugMacros.h:22