[Lldb-commits] [lldb] [LLDB] Add `` to AddressableBits (PR #102110)

2024-08-06 Thread Sam James via lldb-commits

https://github.com/thesamesam created 
https://github.com/llvm/llvm-project/pull/102110

AddressableBits uses `uint32_t` without including `` which fails to 
build w/ GCC 15 after a change in libstdc++ [0]

[0] 
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2

>From bff13abff5c8e477cd282a7b1b8c418a5baf7239 Mon Sep 17 00:00:00 2001
From: Sam James 
Date: Tue, 6 Aug 2024 09:40:55 +0100
Subject: [PATCH] [LLDB] Add `` to AddressableBits

AddressableBits uses `uint32_t` without including ``
which fails to build w/ GCC 15 after a change in libstdc++ [0]

[0] 
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
---
 lldb/include/lldb/Utility/AddressableBits.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lldb/include/lldb/Utility/AddressableBits.h 
b/lldb/include/lldb/Utility/AddressableBits.h
index 0d27c3561ec27..8c7a1ec5f52c0 100644
--- a/lldb/include/lldb/Utility/AddressableBits.h
+++ b/lldb/include/lldb/Utility/AddressableBits.h
@@ -12,6 +12,8 @@
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-public.h"
 
+#include 
+
 namespace lldb_private {
 
 /// \class AddressableBits AddressableBits.h "lldb/Core/AddressableBits.h"

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Add `` to AddressableBits (PR #102110)

2024-08-06 Thread Sam James via lldb-commits

thesamesam wrote:

Thanks!

https://github.com/llvm/llvm-project/pull/102110
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Add `` to AddressableBits (PR #102110)

2024-08-06 Thread Sam James via lldb-commits

https://github.com/thesamesam closed 
https://github.com/llvm/llvm-project/pull/102110
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Add `` to AddressableBits (PR #102110)

2024-08-06 Thread Sam James via lldb-commits

https://github.com/thesamesam milestoned 
https://github.com/llvm/llvm-project/pull/102110
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Add `` to AddressableBits (PR #102110)

2024-08-06 Thread Sam James via lldb-commits

thesamesam wrote:

/cherry-pick bb59f04e7e75dcbe39f1bf952304a157f0035314

https://github.com/llvm/llvm-project/pull/102110
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-26 Thread Sam James via lldb-commits


@@ -284,7 +284,7 @@ def sync_csv(rows: List[Tuple], from_github: 
List[PaperInfo]) -> List[Tuple]:
 results.append(gh.for_printing())
 continue
 elif paper.status != gh.status:
-print(f"We found a CSV row and a Github issue with different 
statuses:\nrow: {row}\Github issue: {gh}")
+print(rf"We found a CSV row and a Github issue with different 
statuses:\nrow: {row}\Github issue: {gh}")

thesamesam wrote:

I believe @negril is right.

Note that https://docs.python.org/3/whatsnew/3.12.html#other-language-changes 
doesn't say it's exclusive to regex:
> A backslash-character pair that is not a valid escape sequence now generates 
> a 
> [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning),
>  instead of 
> [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning).
>  For example, re.compile("\d+\.\d+") now emits a 
> [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning)
>  ("\d" is an invalid escape sequence, use raw strings for regular expression: 
> re.compile(r"\d+\.\d+")). In a future Python version, 
> [SyntaxError](https://docs.python.org/3/library/exceptions.html#SyntaxError) 
> will eventually be raised, instead of 
> [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning).
>  (Contributed by Victor Stinner in 
> [gh-98401](https://github.com/python/cpython/issues/98401).)

https://github.com/llvm/llvm-project/pull/105990
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-26 Thread Sam James via lldb-commits

https://github.com/thesamesam edited 
https://github.com/llvm/llvm-project/pull/105990
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 32a2af4 - [CMake] Fix -Wstrict-prototypes

2022-11-07 Thread Sam James via lldb-commits

Author: Sam James
Date: 2022-11-08T01:37:04Z
New Revision: 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d

URL: 
https://github.com/llvm/llvm-project/commit/32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d
DIFF: 
https://github.com/llvm/llvm-project/commit/32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d.diff

LOG: [CMake] Fix -Wstrict-prototypes

Fixes warnings (or errors, if someone injects -Werror in their build system,
which happens in fact with some folks vendoring LLVM too) with Clang 16:
```
+/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9:
 warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
-/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9:
 error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 int main() {return 0;}
 ^
  void
```

Differential Revision: https://reviews.llvm.org/D137503

Added: 


Modified: 
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
libcxx/cmake/config-ix.cmake
libcxxabi/cmake/config-ix.cmake
libunwind/cmake/config-ix.cmake
lldb/tools/debugserver/source/CMakeLists.txt
llvm/cmake/config-ix.cmake
llvm/cmake/modules/FindFFI.cmake
llvm/cmake/modules/FindTerminfo.cmake
llvm/cmake/modules/FindZ3.cmake
llvm/cmake/modules/HandleLLVMOptions.cmake
openmp/runtime/cmake/config-ix.cmake
polly/lib/External/CMakeLists.txt

Removed: 




diff  --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake 
b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index e2506872751f9..e372da0d99ba0 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -116,7 +116,7 @@ function(darwin_test_archs os valid_archs)
   if(NOT TEST_COMPILE_ONLY)
 message(STATUS "Finding valid architectures for ${os}...")
 set(SIMPLE_C ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/src.c)
-file(WRITE ${SIMPLE_C} "#include \nint main() { printf(__FILE__); 
return 0; }\n")
+file(WRITE ${SIMPLE_C} "#include \nint main(void) { 
printf(__FILE__); return 0; }\n")
 
 set(os_linker_flags)
 foreach(flag ${DARWIN_${os}_LINK_FLAGS})

diff  --git a/compiler-rt/cmake/config-ix.cmake 
b/compiler-rt/cmake/config-ix.cmake
index da86bdcdcf169..f6190ee60e3c3 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -224,7 +224,7 @@ set(COMPILER_RT_SUPPORTED_ARCH)
 # runtime libraries supported by our current compilers cross-compiling
 # abilities.
 set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
-file(WRITE ${SIMPLE_SOURCE} "#include \n#include \nint 
main() { printf(\"hello, world\"); }\n")
+file(WRITE ${SIMPLE_SOURCE} "#include \n#include \nint 
main(void) { printf(\"hello, world\"); }\n")
 
 # Detect whether the current target platform is 32-bit or 64-bit, and setup
 # the correct commandline flags needed to attempt to target 32-bit and 64-bit.

diff  --git a/compiler-rt/lib/builtins/CMakeLists.txt 
b/compiler-rt/lib/builtins/CMakeLists.txt
index fd3d3956439d2..42015ef8f36d6 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -755,7 +755,7 @@ else ()
SOURCE "#if !(__ARM_FP & 0x8)
#error No double-precision support!
#endif
-   int main() { return 0; }")
+   int main(void) { return 0; }")
   if(NOT COMPILER_RT_HAS_${arch}_VFP_DP)
 list(REMOVE_ITEM ${arch}_SOURCES ${arm_Thumb1_VFPv2_DP_SOURCES})
   endif()

diff  --git a/libcxx/cmake/config-ix.cmake b/libcxx/cmake/config-ix.cmake
index a5ce4745a5f6a..3bae536436835 100644
--- a/libcxx/cmake/config-ix.cmake
+++ b/libcxx/cmake/config-ix.cmake
@@ -98,7 +98,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
   check_c_source_compiles("
 #pragma comment(lib, \"c\")
-int main() { return 0; }
+int main(void) { return 0; }
 " C_SUPPORTS_COMMENT_LIB_PRAGMA)
   cmake_pop_check_state()
 endif()

diff  --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index ff9a1bf349e52..f4ee8946c1fea 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/cmake/config-ix.cmake
@@ -81,7 +81,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
   check_c_source_compiles("
 #pragma comment(lib, \"c\")
-int main() { return 0; }
+int main(void) { return 0; }
 " C_SUPPORTS_COMMENT_LIB_PRAGMA)