Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / tools / lldb-dap / SourceBreakpoint.h
blobf4b54a44fc6875635ad84d440bd3383af58ceead
1 //===-- SourceBreakpoint.h --------------------------------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_TOOLS_LLDB_DAP_SOURCEBREAKPOINT_H
10 #define LLDB_TOOLS_LLDB_DAP_SOURCEBREAKPOINT_H
12 #include "BreakpointBase.h"
13 #include "llvm/ADT/StringRef.h"
15 namespace lldb_dap {
17 struct SourceBreakpoint : public BreakpointBase {
19 uint32_t line; ///< The source line of the breakpoint or logpoint
20 uint32_t column; ///< An optional source column of the breakpoint
22 SourceBreakpoint() : BreakpointBase(), line(0), column(0) {}
23 SourceBreakpoint(const llvm::json::Object &obj);
25 // Set this breakpoint in LLDB as a new breakpoint
26 void SetBreakpoint(const llvm::StringRef source_path);
29 inline bool operator<(const SourceBreakpoint &lhs,
30 const SourceBreakpoint &rhs) {
31 if (lhs.line == rhs.line)
32 return lhs.column < rhs.column;
33 return lhs.line < rhs.line;
36 } // namespace lldb_dap
38 #endif