[Lldb-commits] [lldb] [lldb] Support specifying a language for breakpoint conditions (PR #147603)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 9 02:51:08 PDT 2025


================
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_BREAKPOINT_STOPCONDITION_H
+#define LLDB_BREAKPOINT_STOPCONDITION_H
+
+#include "lldb/lldb-private.h"
+
+namespace lldb_private {
+
+class StopCondition {
+public:
+  StopCondition(std::string text = "",
+                lldb::LanguageType language = lldb::eLanguageTypeUnknown)
+      : m_language(language) {
+    SetText(text);
+  }
+
+  operator bool() const { return !m_text.empty(); }
+
+  const std::string &GetText() const { return m_text; }
----------------
Michael137 wrote:

```suggestion
  llvm::StringRef GetText() const { return m_text; }
```
?

https://github.com/llvm/llvm-project/pull/147603


More information about the lldb-commits mailing list