[Lldb-commits] [clang] [lldb] fixing issue #64441 (PR #74814)
https://github.com/jeevanghimire closed https://github.com/llvm/llvm-project/pull/74814 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitry Vasilyev (slydiman) Changes EchoCommandsQuiet.out failed in case of a remote target because the platform selection and connection messages. --- Full diff: https://github.com/llvm/llvm-project/pull/94127.diff 1 Files Affected: - (modified) lldb/test/Shell/Settings/TestEchoCommands.test (+2) ``diff diff --git a/lldb/test/Shell/Settings/TestEchoCommands.test b/lldb/test/Shell/Settings/TestEchoCommands.test index 234b9742bfa2a..ce78f91e1cbd4 100644 --- a/lldb/test/Shell/Settings/TestEchoCommands.test +++ b/lldb/test/Shell/Settings/TestEchoCommands.test @@ -2,6 +2,8 @@ # RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNoComments.out # RUN: %lldb -x -b -o 'settings set interpreter.echo-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNone.out +XFAIL: remote{{.*}} + RUN: echo start >%t.file RUN: %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in >>%t.file RUN: echo done >>%t.file `` https://github.com/llvm/llvm-project/pull/94127 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fixed TestEchoCommands.test running on a remote target (PR #94127)
https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/94127 EchoCommandsQuiet.out failed in case of a remote target because the platform selection and connection messages. >From f27a61721ed817a4be73c78485b842c2dcb93e18 Mon Sep 17 00:00:00 2001 From: Dmitry Vassiliev Date: Sun, 2 Jun 2024 02:15:02 +0400 Subject: [PATCH] [lldb] Fixed TestEchoCommands.test running on a remote target EchoCommandsQuiet.out failed in case of a remote target because the platform selection and connection messages. --- lldb/test/Shell/Settings/TestEchoCommands.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/test/Shell/Settings/TestEchoCommands.test b/lldb/test/Shell/Settings/TestEchoCommands.test index 234b9742bfa2a..ce78f91e1cbd4 100644 --- a/lldb/test/Shell/Settings/TestEchoCommands.test +++ b/lldb/test/Shell/Settings/TestEchoCommands.test @@ -2,6 +2,8 @@ # RUN: %lldb -x -b -o 'settings set interpreter.echo-comment-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNoComments.out # RUN: %lldb -x -b -o 'settings set interpreter.echo-commands false' -s %S/Inputs/EchoCommandsTest.in | FileCheck %S/Inputs/EchoCommandsNone.out +XFAIL: remote{{.*}} + RUN: echo start >%t.file RUN: %lldb -x -b --source-quietly -s %S/Inputs/EchoCommandsTest.in >>%t.file RUN: echo done >>%t.file ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Use StringRef::starts_with (NFC) (PR #94112)
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/94112 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 2a1ea15 - Use StringRef::starts_with (NFC) (#94112)
Author: Kazu Hirata Date: 2024-06-01T10:36:05-07:00 New Revision: 2a1ea151cccba3de21edb950099a75ca8d3ea604 URL: https://github.com/llvm/llvm-project/commit/2a1ea151cccba3de21edb950099a75ca8d3ea604 DIFF: https://github.com/llvm/llvm-project/commit/2a1ea151cccba3de21edb950099a75ca8d3ea604.diff LOG: Use StringRef::starts_with (NFC) (#94112) Added: Modified: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/source/Utility/UriParser.cpp llvm/lib/MC/MCExpr.cpp Removed: diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp index 5f0684163328f..06c827c2543f4 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -152,7 +152,7 @@ static bool IsTrivialBasename(const llvm::StringRef ) { // because it is significantly more efficient then using the general purpose // regular expression library. size_t idx = 0; - if (basename.size() > 0 && basename[0] == '~') + if (basename.starts_with('~')) idx = 1; if (basename.size() <= idx) diff --git a/lldb/source/Utility/UriParser.cpp b/lldb/source/Utility/UriParser.cpp index 432b046d008b9..1932e11acb4c0 100644 --- a/lldb/source/Utility/UriParser.cpp +++ b/lldb/source/Utility/UriParser.cpp @@ -47,7 +47,7 @@ std::optional URI::Parse(llvm::StringRef uri) { ((path_pos != std::string::npos) ? path_pos : uri.size()) - host_pos); // Extract hostname - if (!host_port.empty() && host_port[0] == '[') { + if (host_port.starts_with('[')) { // hostname is enclosed with square brackets. pos = host_port.rfind(']'); if (pos == std::string::npos) diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index bbee2a64032a0..b065d03651c45 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -76,7 +76,7 @@ void MCExpr::print(raw_ostream , const MCAsmInfo *MAI, bool InParens) const { // Parenthesize names that start with $ so that they don't look like // absolute names. bool UseParens = MAI && MAI->useParensForDollarSignNames() && !InParens && - !Sym.getName().empty() && Sym.getName()[0] == '$'; + Sym.getName().starts_with('$'); if (UseParens) { OS << '('; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Use StringRef::starts_with (NFC) (PR #94112)
https://github.com/JOE1994 approved this pull request. https://github.com/llvm/llvm-project/pull/94112 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Use StringRef::starts_with (NFC) (PR #94112)
llvmbot wrote: @llvm/pr-subscribers-mc Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94112.diff 3 Files Affected: - (modified) lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (+1-1) - (modified) lldb/source/Utility/UriParser.cpp (+1-1) - (modified) llvm/lib/MC/MCExpr.cpp (+1-1) ``diff diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp index 5f0684163328f..06c827c2543f4 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -152,7 +152,7 @@ static bool IsTrivialBasename(const llvm::StringRef ) { // because it is significantly more efficient then using the general purpose // regular expression library. size_t idx = 0; - if (basename.size() > 0 && basename[0] == '~') + if (basename.starts_with('~')) idx = 1; if (basename.size() <= idx) diff --git a/lldb/source/Utility/UriParser.cpp b/lldb/source/Utility/UriParser.cpp index 432b046d008b9..1932e11acb4c0 100644 --- a/lldb/source/Utility/UriParser.cpp +++ b/lldb/source/Utility/UriParser.cpp @@ -47,7 +47,7 @@ std::optional URI::Parse(llvm::StringRef uri) { ((path_pos != std::string::npos) ? path_pos : uri.size()) - host_pos); // Extract hostname - if (!host_port.empty() && host_port[0] == '[') { + if (host_port.starts_with('[')) { // hostname is enclosed with square brackets. pos = host_port.rfind(']'); if (pos == std::string::npos) diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index bbee2a64032a0..b065d03651c45 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -76,7 +76,7 @@ void MCExpr::print(raw_ostream , const MCAsmInfo *MAI, bool InParens) const { // Parenthesize names that start with $ so that they don't look like // absolute names. bool UseParens = MAI && MAI->useParensForDollarSignNames() && !InParens && - !Sym.getName().empty() && Sym.getName()[0] == '$'; + Sym.getName().starts_with('$'); if (UseParens) { OS << '('; `` https://github.com/llvm/llvm-project/pull/94112 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [llvm] Use StringRef::starts_with (NFC) (PR #94112)
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/94112 None >From 8e474178754a28e3e509be4fa42faa5b13888f66 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 1 Jun 2024 06:55:48 -0700 Subject: [PATCH] Use StringRef::starts_with (NFC) --- lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp | 2 +- lldb/source/Utility/UriParser.cpp| 2 +- llvm/lib/MC/MCExpr.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp index 5f0684163328f..06c827c2543f4 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -152,7 +152,7 @@ static bool IsTrivialBasename(const llvm::StringRef ) { // because it is significantly more efficient then using the general purpose // regular expression library. size_t idx = 0; - if (basename.size() > 0 && basename[0] == '~') + if (basename.starts_with('~')) idx = 1; if (basename.size() <= idx) diff --git a/lldb/source/Utility/UriParser.cpp b/lldb/source/Utility/UriParser.cpp index 432b046d008b9..1932e11acb4c0 100644 --- a/lldb/source/Utility/UriParser.cpp +++ b/lldb/source/Utility/UriParser.cpp @@ -47,7 +47,7 @@ std::optional URI::Parse(llvm::StringRef uri) { ((path_pos != std::string::npos) ? path_pos : uri.size()) - host_pos); // Extract hostname - if (!host_port.empty() && host_port[0] == '[') { + if (host_port.starts_with('[')) { // hostname is enclosed with square brackets. pos = host_port.rfind(']'); if (pos == std::string::npos) diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index bbee2a64032a0..b065d03651c45 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -76,7 +76,7 @@ void MCExpr::print(raw_ostream , const MCAsmInfo *MAI, bool InParens) const { // Parenthesize names that start with $ so that they don't look like // absolute names. bool UseParens = MAI && MAI->useParensForDollarSignNames() && !InParens && - !Sym.getName().empty() && Sym.getName()[0] == '$'; + Sym.getName().starts_with('$'); if (UseParens) { OS << '('; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)
Endilll wrote: @vvereschaka Thank you for letting me know! I wonder how this got past our pre- and post-commit CI, because we do build lldb with MSVC there. You fix makes total sense, so I applied it. https://github.com/llvm/llvm-project/pull/92953 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] cd676e5 - [lldb] Guard some GCC-style flags from MSVC
Author: Vlad Serebrennikov Date: 2024-06-01T12:48:12+03:00 New Revision: cd676e5b27cb985697deac052c797057f5a33c06 URL: https://github.com/llvm/llvm-project/commit/cd676e5b27cb985697deac052c797057f5a33c06 DIFF: https://github.com/llvm/llvm-project/commit/cd676e5b27cb985697deac052c797057f5a33c06.diff LOG: [lldb] Guard some GCC-style flags from MSVC A follow up to #92953. Suggested in https://github.com/llvm/llvm-project/pull/92953#issuecomment-2143274065 Added: Modified: lldb/cmake/modules/LLDBConfig.cmake Removed: diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index f2afced7403bd..a60921990cf77 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -186,13 +186,15 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # printed. Therefore, check for whether the compiler supports options in the # form -W, and if supported, add the corresponding -Wno- option. -# Disable GCC warnings -append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS) -append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS) -append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS) - -check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION) -append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS) +if (LLVM_COMPILER_IS_GCC_COMPATIBLE) + # Disable GCC warnings + append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS) + append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS) + append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS) + + check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION) + append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS) +endif() # Disable Clang warnings if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits