[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-10-25 Thread Mark de Wever via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0e4264ab1e7a: [lldb][libc++] Adds chrono data formatters. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159127/new/

https://reviews.llvm.org/D159127

Files:
  lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp

Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
@@ -0,0 +1,19 @@
+#include 
+#include 
+
+int main() {
+  // break here
+  std::chrono::nanoseconds ns{1};
+  std::chrono::microseconds us{12};
+  std::chrono::milliseconds ms{123};
+  std::chrono::seconds s{1234};
+  std::chrono::minutes min{12345};
+  std::chrono::hours h{123456};
+
+  std::chrono::days d{654321};
+  std::chrono::weeks w{54321};
+  std::chrono::months m{4321};
+  std::chrono::years y{321};
+
+  std::cout << "break here\n";
+}
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
@@ -0,0 +1,33 @@
+"""
+Test lldb data formatter subsystem.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LibcxxChronoDataFormatterTestCase(TestBase):
+@add_test_categories(["libc++"])
+def test_with_run_command(self):
+"""Test that that file and class static variables display correctly."""
+self.build()
+(self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+self, "break here", lldb.SBFileSpec("main.cpp", False)
+)
+
+lldbutil.continue_to_breakpoint(process, bkpt)
+self.expect("frame variable ns", substrs=["ns = 1 ns"])
+self.expect("frame variable us", substrs=["us = 12 µs"])
+self.expect("frame variable ms", substrs=["ms = 123 ms"])
+self.expect("frame variable s", substrs=["s = 1234 s"])
+self.expect("frame variable min", substrs=["min = 12345 min"])
+self.expect("frame variable h", substrs=["h = 123456 h"])
+
+self.expect("frame variable d", substrs=["d = 654321 days"])
+self.expect("frame variable w", substrs=["w = 54321 weeks"])
+self.expect("frame variable m", substrs=["m = 4321 months"])
+self.expect("frame variable y", substrs=["y = 321 years"])
+
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+
+USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++20
+include Makefile.rules
Index: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===
--- lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -979,6 +979,57 @@
   "std::unordered_map iterator synthetic children",
   "^std::__[[:alnum:]]+::__hash_map_(const_)?iterator<.+>$",
   stl_synth_flags, true);
+  // Chrono duration typedefs
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::nanoseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} ns")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::microseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} µs")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::milliseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} ms")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::seconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} s")));
+  

[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-10-25 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D159127#4654774 , @Michael137 
wrote:

> Was looking at leftover reviews, would be nice to land this

Thanks for the review!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159127/new/

https://reviews.llvm.org/D159127

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


[Lldb-commits] [PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2023-09-04 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.
Herald added subscribers: bviyer, jplehr.

For libc++ we like to clean up the review queue for the GitHub PR transition. 
Is there still interest on working on this patch? If so would it be possible to 
finish it before the Phabricator is changed to read only mode?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137337/new/

https://reviews.llvm.org/D137337

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


[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-09-04 Thread Mark de Wever via Phabricator via lldb-commits
Mordante updated this revision to Diff 555763.
Mordante marked an inline comment as done.
Mordante added a comment.

Address review comments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159127/new/

https://reviews.llvm.org/D159127

Files:
  lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp

Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
@@ -0,0 +1,19 @@
+#include 
+#include 
+
+int main() {
+  // break here
+  std::chrono::nanoseconds ns{1};
+  std::chrono::microseconds us{12};
+  std::chrono::milliseconds ms{123};
+  std::chrono::seconds s{1234};
+  std::chrono::minutes min{12345};
+  std::chrono::hours h{123456};
+
+  std::chrono::days d{654321};
+  std::chrono::weeks w{54321};
+  std::chrono::months m{4321};
+  std::chrono::years y{321};
+
+  std::cout << "break here\n";
+}
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
@@ -0,0 +1,33 @@
+"""
+Test lldb data formatter subsystem.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LibcxxChronoDataFormatterTestCase(TestBase):
+@add_test_categories(["libc++"])
+def test_with_run_command(self):
+"""Test that that file and class static variables display correctly."""
+self.build()
+(self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+self, "break here", lldb.SBFileSpec("main.cpp", False)
+)
+
+lldbutil.continue_to_breakpoint(process, bkpt)
+self.expect("frame variable ns", substrs=["ns = 1 ns"])
+self.expect("frame variable us", substrs=["us = 12 µs"])
+self.expect("frame variable ms", substrs=["ms = 123 ms"])
+self.expect("frame variable s", substrs=["s = 1234 s"])
+self.expect("frame variable min", substrs=["min = 12345 min"])
+self.expect("frame variable h", substrs=["h = 123456 h"])
+
+self.expect("frame variable d", substrs=["d = 654321 days"])
+self.expect("frame variable w", substrs=["w = 54321 weeks"])
+self.expect("frame variable m", substrs=["m = 4321 months"])
+self.expect("frame variable y", substrs=["y = 321 years"])
+
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+
+USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++20
+include Makefile.rules
Index: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===
--- lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -981,6 +981,57 @@
   "std::unordered_map iterator synthetic children",
   "^std::__[[:alnum:]]+::__hash_map_(const_)?iterator<.+>$",
   stl_synth_flags, true);
+  // Chrono duration typedefs
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::nanoseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} ns")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::microseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} µs")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::milliseconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} ms")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::seconds", eFormatterMatchRegex,
+  TypeSummaryImplSP(new StringSummaryFormat(
+  eTypeOptionHideChildren | eTypeOptionHideValue, "${var.__rep_} s")));
+  cpp_category_sp->AddTypeSummary(
+  "^std::__[[:alnum:]]+::chrono::minutes", eFormatterMatchRegex,
+  

[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-09-04 Thread Mark de Wever via Phabricator via lldb-commits
Mordante marked 4 inline comments as done.
Mordante added inline comments.



Comment at: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp:986-993
+  "^std::__[[:alnum:]]+::chrono::"
+  "(((nano)|(micro)|(milli)|())seconds)|"
+  "(minutes)|"
+  "(hours)|"
+  "(days)|"
+  "(weeks)|"
+  "(months)|"

kastiglione wrote:
> there's some regex grouping that doesn't seem to be needed.
Earlier testing without grouping didn't work. Since the next iteration uses 
units here is a regex per type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159127/new/

https://reviews.llvm.org/D159127

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


[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-08-30 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D159127#4626311 , @kastiglione 
wrote:

> Thanks for doing this!
>
> Question to all: Should the summary string include the unit? lldb doesn't 
> always show the type, so it could help comprehension if the unit is included. 
> For example `60s` instead of `60`.

I was wondering about that too, but I wasn't sure whether that was wanted. If 
we do that what do you prefer for micro seconds us or µs. The latter uses 
Unicode. The C++ Standard allows both http://eel.is/c++draft/time.duration.io.




Comment at: 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py:23
+# clean slate for the next test case.
+def cleanup():
+self.runCmd("type format clear", check=False)

aprantl wrote:
> You probably copied & pasted this — this is no longer needed since every test 
> function is now running in its own instance.
I indeed copy-pasted the vector code; it's the first time I look at these 
formatters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159127/new/

https://reviews.llvm.org/D159127

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


[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

2023-08-29 Thread Mark de Wever via Phabricator via lldb-commits
Mordante created this revision.
Mordante added reviewers: Michael137, aprantl.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This adds the data formatters for chrono duration typedefs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159127

Files:
  lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp

Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp
@@ -0,0 +1,18 @@
+#include 
+
+int main() {
+  // break here
+  std::chrono::nanoseconds ns{1};
+  std::chrono::microseconds us{12};
+  std::chrono::milliseconds ms{123};
+  std::chrono::seconds s{1234};
+  std::chrono::minutes min{12345};
+  std::chrono::hours h{123456};
+
+  std::chrono::days d{654321};
+  std::chrono::weeks w{54321};
+  std::chrono::months m{4321};
+  std::chrono::years y{321};
+
+  return 0; // break here
+}
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py
@@ -0,0 +1,58 @@
+"""
+Test lldb data formatter subsystem.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LibcxxChronoDataFormatterTestCase(TestBase):
+@add_test_categories(["libc++"])
+def test_with_run_command(self):
+"""Test that that file and class static variables display correctly."""
+self.build()
+(self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+self, "break here", lldb.SBFileSpec("main.cpp", False)
+)
+
+# This is the function to remove the custom formats in order to have a
+# clean slate for the next test case.
+def cleanup():
+self.runCmd("type format clear", check=False)
+self.runCmd("type summary clear", check=False)
+self.runCmd("type filter clear", check=False)
+self.runCmd("type synth clear", check=False)
+self.runCmd("settings set target.max-children-count 256", check=False)
+
+# Execute the cleanup function during test case tear down.
+self.addTearDownHook(cleanup)
+
+# empty vectors (and storage pointers SHOULD BOTH BE NULL..)
+self.expect("frame variable ns", substrs=["ns = 0"])
+self.expect("frame variable us", substrs=["us = 0"])
+self.expect("frame variable ms", substrs=["ms = 0"])
+self.expect("frame variable s", substrs=["s = 0"])
+self.expect("frame variable min", substrs=["min = 0"])
+self.expect("frame variable h", substrs=["h = 0"])
+
+self.expect("frame variable d", substrs=["d = 0"])
+self.expect("frame variable w", substrs=["w = 0"])
+self.expect("frame variable m", substrs=["m = 0"])
+self.expect("frame variable y", substrs=["y = 0"])
+
+lldbutil.continue_to_breakpoint(process, bkpt)
+self.expect("frame variable ns", substrs=["ns = 1"])
+self.expect("frame variable us", substrs=["us = 12"])
+self.expect("frame variable ms", substrs=["ms = 123"])
+self.expect("frame variable s", substrs=["s = 1234"])
+self.expect("frame variable min", substrs=["min = 12345"])
+self.expect("frame variable h", substrs=["h = 123456"])
+
+self.expect("frame variable d", substrs=["d = 654321"])
+self.expect("frame variable w", substrs=["w = 54321"])
+self.expect("frame variable m", substrs=["m = 4321"])
+self.expect("frame variable y", substrs=["y = 321"])
+
Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+
+USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++20
+include Makefile.rules
Index: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===
--- lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -981,6 +981,19 @@
   

[Lldb-commits] [PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-27 Thread Mark de Wever via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.
Closed by commit rGcbaa3597aaf6: Reland [CMake] Bumps minimum version to 
3.20.0. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151344/new/

https://reviews.llvm.org/D151344

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  cmake/Modules/CMakePolicy.cmake
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/src/CMakeLists.txt
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,16 +1,13 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
-project(Runtimes C CXX ASM)
+cmake_minimum_required(VERSION 3.20.0)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
+project(Runtimes C CXX ASM)
+
 list(INSERT CMAKE_MODULE_PATH 0
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a 

[Lldb-commits] [PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-27 Thread Mark de Wever via Phabricator via lldb-commits
Mordante accepted this revision.
Mordante marked 3 inline comments as done.
Mordante added a comment.

In D151344#4368926 , @MaskRay wrote:

> Thank you for making another try for the treewide change (which is admittedly 
> very painful and not many people do such work).

Thanks. And it indeed takes quite a lot of effort.

> Can you include the original patch description to the summary? That is the 
> main part and the message "This reverts commit " is secondary. Readers should 
> not need to trace through the revert history to obtain the original 
> motivation.

Good suggestion I've updated the message.

Since @glandium and @hans seem happy with the changes I'll land this patch.




Comment at: libunwind/src/CMakeLists.txt:28-35
 
 # See add_asm_sources() in compiler-rt for explanation of this workaround.
 # CMake doesn't work correctly with assembly on AIX. Workaround by compiling
 # as C files as well.
 if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR
-   (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR
-   (${CMAKE_SYSTEM_NAME} MATCHES "AIX"))
+   (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
   set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)

h-vetinari wrote:
> mstorsjo wrote:
> > h-vetinari wrote:
> > > Shouldn't it be possible to remove that entire block (as it only fires 
> > > for CMake <3.20)?
> > The intention was to do such cleanups in a later patch, as mentioned in the 
> > original commit message in https://reviews.llvm.org/D144509. (I guess it 
> > would be good to bring the original commit message along with the reland 
> > attempts too.)
> Well sure, but "workarounds" is a broad term. It makes sense to not try to 
> clean up everything that newer CMake enables, but this PR does remove a lot 
> of (all?) other lines with `CMAKE_VERSION VERSION_LESS ` where x<3.20. On 
> top of that, since this line is already being changed (which is why I noticed 
> in the first place), I'd suggest to just remove it. But I don't feel strongly 
> about this, just thought I'd point it out.
Yes the intention is to do these cleanups later. The patch does more than I'd 
like already. However that is due to the original patch and followups being 
reverted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151344/new/

https://reviews.llvm.org/D151344

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


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-24 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

I've created D151344  @glandium @hans @thakis 
I really would appreciate when you can test the patch locally to avoid another 
revert round.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

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


[Lldb-commits] [PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-24 Thread Mark de Wever via Phabricator via lldb-commits
Mordante created this revision.
Mordante added reviewers: glandium, hans, thakis.
Herald added subscribers: libc-commits, bviyer, ekilmer, Moerafaat, zero9178, 
Enna1, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, 
rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, 
liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, 
mehdi_amini, mstorsjo, whisperity.
Herald added a reviewer: bollu.
Herald added a reviewer: ldionne.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a reviewer: NoQ.
Herald added projects: libc-project, Flang, All.
Mordante requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, libcxx-commits, openmp-commits, 
lldb-commits, Sanitizers, cfe-commits, jplehr, yota9, sstefan1, 
stephenneuendorffer, nicolasvasilache, jdoerfert.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
libunwind, MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
Herald added a reviewer: libunwind.

This reverts commit d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
.

Adds the patch by @hans from
https://github.com/llvm/llvm-project/issues/62719


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151344

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  cmake/Modules/CMakePolicy.cmake
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/src/CMakeLists.txt
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,16 +1,13 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
-project(Runtimes C CXX ASM)
+cmake_minimum_required(VERSION 3.20.0)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
+project(Runtimes C CXX ASM)
+
 list(INSERT CMAKE_MODULE_PATH 0
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the 

[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-19 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D144509#4356160 , @hans wrote:

> In D144509#4350052 , @Mordante 
> wrote:
>
>> In D144509#4349921 , @thakis wrote:
>>
>>> Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
>>>  for 
>>> now.
>>>
>>> Sorry this is such a pain to land :(
>>>
>>> (See also discussion over in D150688 )
>>
>> I'm not happy that the patch needs to be reverted again.
>>
>> It has taken me a lot of time to contact all buildbots maintainers to get 
>> all buildbots updated to the minimal CMake requirement.
>
> I sympathize with this, but I still believe reverting in these situations is 
> the right thing to do. It reduces disruption for everyone who needs their 
> builds to keep working, while allowing the failures to be investigated 
> without the pressure of knowing that head is currently broken. That this 
> patch has been hard to land is in the nature of the change itself.

I'm caught quite off-guard that it seems the LLVM buildbots don't cover our 
Windows support that well. It would also be great to know how we can improve 
the process to update dependency versions. The current way does not really 
encourage me to propose LLVM wide updates again.

>> Now that they are updated it turned out that one of the two last updated 
>> bots has an issue with this patch and that has been fixed. But now it seems 
>> to break Chromium. I don't have access to Windows so I don't know how I can 
>> test patches.
>
> I'm happy to test patches on my Windows machine.

Thanks!

>> Do you have a suggestion how we can move this patch forward?
>
> IIRC, D150688  + the diff in 
> https://github.com/llvm/llvm-project/issues/62719#issuecomment-1552903385 + 
> upgrading the pre-merge linux bot should take care of all known issues.

Would it make sense to put all these patches in one new review and then test 
that on Chromium and ask @glandium to test that too. Then we know whether it 
solves the issues. Do you want me to make a patch or do you want to do it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

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


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D144509#4350148 , @thakis wrote:

> https://github.com/llvm/llvm-project/issues/62719 is independent of chromium 
> and others have reported problems above too, from what I understand. Is that 
> not accurate?

That bug report originally was independent of Chromium, that part was fixed by 
D150688 . This wasn't noticed earlier since 
that happened on one of the buildbots that took the longest to update. For the 
earlier failed landings there was never a notification this patch caused issues 
on Chromium, so I'm quite taken by surprise.

The other issues I see are build errors on Chromium, unless I missed something.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

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


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D144509#4349017 , @dyung wrote:

> I'm not really sure where else to post this, but the pre-merge linux bot 
> still seems to be running 3.18.4.
>
> https://buildkite.com/llvm-project/premerge-checks/builds/152678#018828d2-1837-4fc2-baec-fca595969219
>
>   CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
> CMake 3.20.0 or higher is required.  You are running version 3.18.4

Thanks, I've notified the owner of the build bot.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

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


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D144509#4349921 , @thakis wrote:

> Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
>  for now.
>
> Sorry this is such a pain to land :(
>
> (See also discussion over in D150688 )

I'm not happy that the patch needs to be reverted again.

It has taken me a lot of time to contact all buildbots maintainers to get all 
buildbots updated to the minimal CMake requirement.
Now that they are updated it turned out that one of the two last updated bots 
has an issue with this patch and that has been fixed. But now it seems to break 
Chromium. I don't have access to Windows so I don't know how I can test patches.

Do you have a suggestion how we can move this patch forward?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

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


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-03-04 Thread Mark de Wever via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG44c6b905f852: [CMake] Bumps minimum version to 3.20.0. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)

[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-26 Thread Mark de Wever via Phabricator via lldb-commits
Mordante updated this revision to Diff 500547.
Mordante added a comment.

Rebased to test CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)
-cmake_policy(VERSION 3.13.4)
+cmake_policy(VERSION 3.20.0)
 
 find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED)
 
Index: 

[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-22 Thread Mark de Wever via Phabricator via lldb-commits
Mordante updated this revision to Diff 499569.
Mordante added a comment.
Herald added a subscriber: mstorsjo.

Try to fix AIX CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)
-cmake_policy(VERSION 3.13.4)
+cmake_policy(VERSION 3.20.0)
 
 find_package(OpenMP ${OpenMPTarget_FIND_VERSION} 

[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-21 Thread Mark de Wever via Phabricator via lldb-commits
Mordante created this revision.
Mordante added reviewers: bollu, tstellar, mehdi_amini, MaskRay, ChuanqiXu, 
to268, kparzysz, thieta, tschuett, mgorny, stellaraccident, mizvekov, ldionne, 
jdoerfert, phosek.
Herald added subscribers: libc-commits, libcxx-commits, Moerafaat, zero9178, 
Enna1, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, 
rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, 
liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, 
thopre, whisperity.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a reviewer: NoQ.
Herald added projects: libunwind, libc-project, Flang, All.
Herald added a reviewer: libunwind.
Mordante added reviewers: libc++ vendors, clang-vendors.
Mordante published this revision for review.
Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, 
Sanitizers, cfe-commits, yota9, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

This partly undoes D137724 .

This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193

Note this does not remove work-arounds for older CMake versions, that
will be done in followup patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- 

[Lldb-commits] [PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

Thanks for your contribution, I just landed this patch on your behalf.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

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


[Lldb-commits] [PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG898b5c9f5e77: [NFC] Fix form/from typos 
(authored by pfusik, committed by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

Files:
  clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  libcxx/include/__format/extended_grapheme_cluster_table.h
  libcxx/utils/generate_extended_grapheme_cluster_table.py
  lldb/include/lldb/Host/File.h
  lldb/source/Plugins/CMakeLists.txt
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
  llvm/test/DebugInfo/ARM/PR26163.ll
  llvm/tools/llvm-exegesis/lib/Clustering.cpp
  llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
  llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
  mlir/lib/Dialect/Transform/IR/TransformDialect.cpp

Index: mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
===
--- mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
+++ mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
@@ -74,7 +74,7 @@
 
 void transform::TransformDialect::mergeInPDLMatchHooks(
 llvm::StringMap &) {
-  // Steal the constraint functions form the given map.
+  // Steal the constraint functions from the given map.
   for (auto  : constraintFns)
 pdlMatchHooks.registerConstraintFunction(it.getKey(), std::move(it.second));
 }
Index: llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
===
--- llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
+++ llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
@@ -130,7 +130,7 @@
 }
 
 TEST(RandomIRBuilderTest, ShuffleVectorSink) {
-  // Check that we will never use shuffle vector mask as a sink form the
+  // Check that we will never use shuffle vector mask as a sink from the
   // unrelated operation.
 
   LLVMContext Ctx;
Index: llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
===
--- llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -6,7 +6,7 @@
 //
 //===--===//
 //
-// This test suite verifies basic MCJIT functionality when invoked form the C
+// This test suite verifies basic MCJIT functionality when invoked from the C
 // API.
 //
 //===--===//
Index: llvm/tools/llvm-exegesis/lib/Clustering.cpp
===
--- llvm/tools/llvm-exegesis/lib/Clustering.cpp
+++ llvm/tools/llvm-exegesis/lib/Clustering.cpp
@@ -314,7 +314,7 @@
   // Actually append to-be-moved points to the new cluster.
   UnstableCluster.PointIndices.insert(UnstableCluster.PointIndices.end(),
   it, OldCluster.PointIndices.end());
-  // And finally, remove "to-be-moved" points form the old cluster.
+  // And finally, remove "to-be-moved" points from the old cluster.
   OldCluster.PointIndices.erase(it, OldCluster.PointIndices.end());
   // Now, the old cluster may end up being empty, but let's just keep it
   // in whatever state it ended up. Purging empty clusters isn't worth it.
Index: llvm/test/DebugInfo/ARM/PR26163.ll
===
--- llvm/test/DebugInfo/ARM/PR26163.ll
+++ llvm/test/DebugInfo/ARM/PR26163.ll
@@ -17,7 +17,7 @@
 ; CHECK-NEXT: DW_AT_location (DW_OP_lit0, DW_OP_stack_value, DW_OP_piece 0x4)
 ; CHECK-NEXT: DW_AT_abstract_origin
 
-; Created form the following test case (PR26163) with
+; Created from the following test case (PR26163) with
 ; clang -cc1 -triple armv4t--freebsd11.0-gnueabi -emit-obj -debug-info-kind=standalone -O2 -x c test.c
 ;
 ; typedef	unsigned int	size_t;
Index: llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
===
--- llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+++ llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
@@ -722,7 +722,7 @@
 
 /// Updates the operand at Idx in instruction Inst with the result of
 ///instruction Mat. If the instruction is a PHI node then special
-///handling for duplicate values form the same incoming basic block is
+///handling for duplicate values from the same incoming basic block is
 ///required.
 /// \return The update will always succeed, but the return value indicated if
 /// Mat was used for the update or not.
Index: 

[Lldb-commits] [PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D142007#4071765 , @pfusik wrote:

> @ldionne Can you check it in?

Can you provide your name and email address to we can attribute the patch to 
you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

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


[Lldb-commits] [PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-11 Thread Mark de Wever via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.
Closed by commit rGd40dc417389e: [CMake] Warn when the version is older than 
3.20.0. (authored by Mordante).

Changed prior to commit:
  https://reviews.llvm.org/D137724?vs=474295=481933#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  openmp/CMakeLists.txt
  polly/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,5 +1,12 @@
 # This file handles building LLVM runtime sub-projects.
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM will become 3.20.0, and "
+"using an older CMake will become an error. Please upgrade your CMake to "
+"at least 3.20.0 now to avoid issues in the future!")
+endif()
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -2,6 +2,13 @@
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
   cmake_minimum_required(VERSION 3.13.4)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/CMakeLists.txt
===
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -12,6 +12,13 @@
 if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   set(OPENMP_STANDALONE_BUILD TRUE)
   project(openmp C CXX)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: mlir/CMakeLists.txt
===
--- mlir/CMakeLists.txt
+++ mlir/CMakeLists.txt
@@ -11,6 +11,13 @@
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   project(mlir)
   set(MLIR_STANDALONE_BUILD TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: llvm/docs/ReleaseNotes.rst
===
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -64,6 +64,17 @@
 * Apple Clang >= 10.0
 * Visual Studio 2019 >= 16.7
 
+With LLVM 16.x we will raise the version requirement of CMake used to build
+LLVM. The new requirements are as follows:
+
+* CMake >= 3.20.0
+
+In LLVM 16.x this requirement will be "soft", there will only be a diagnostic.
+
+With the release of LLVM 17.x this requirement will be hard and LLVM developers
+can start using CMake 3.20.0 features, making it impossible to build with older
+versions of CMake.
+
 Changes to the LLVM IR
 --
 
Index: llvm/CMakeLists.txt
===
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -1,6 +1,13 @@
 # See docs/CMake.html for instructions about how to build LLVM with CMake.
 
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM 

[Lldb-commits] [PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-11 Thread Mark de Wever via Phabricator via lldb-commits
Mordante marked an inline comment as done.
Mordante added a comment.

Thanks for all reviews!

In D137724#3974764 , @thieta wrote:

> I think this is ready to land @Mordante or is there anything else missing?

No but I've been quite busy. I needed some time to find the list of buildbot 
owners to mail after landing this.




Comment at: clang/CMakeLists.txt:14
   set(CLANG_BUILT_STANDALONE TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING

mgorny wrote:
> I wonder if we could move this to `CMakePolicy.cmake`, though admittedly 
> you'd have to somehow avoid warning multiple times in in-tree builds.
Yes I prefer to keep it this way. The warning will be removed once 3.20.0 or 
newer is mandated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

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


[Lldb-commits] [PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-07 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D137724#3917644 , @MaskRay wrote:

> I think `if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)` checks for 
> standalone builds is not necessary. The check in `llvm/CMakeLists.txt` 
> suffices.
> It's unlikely the users will use different cmake versions to configure llvm 
> and a subproject like clang.

I can remove the others, but we need to keep the one in 
`runtimes/CMakeLists.txt` too. The runtimes (libc++, libc++abi, and libunwind) 
can be build without building or configuring LLVM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

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


[Lldb-commits] [PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-07 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D137724#3917616 , @thieta wrote:

> I think this is fine as we have discussed before. But I really dislike the 
> code duplication for the check. We could put it in a include() I guess - but 
> maybe it's not worth it.

I wanted to make sure it shows up in different build scenarios. The code is 
temporary, once we switch to CMake 3.20.0 we can just change the 
`cmake_minimum_required` and remove these verbose blocks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

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


[Lldb-commits] [PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-07 Thread Mark de Wever via Phabricator via lldb-commits
Mordante created this revision.
Herald added a reviewer: bollu.
Herald added subscribers: Moerafaat, zero9178, Enna1, bzcheeseman, sdasgup3, 
wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, 
Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, 
antiagainst, shauheen, rriddle, mehdi_amini.
Herald added projects: Flang, All.
Mordante edited the summary of this revision.
Mordante added reviewers: libc++ vendors, clang-vendors, tstellar, mehdi_amini, 
MaskRay, ChuanqiXu, to268, kparzysz, thieta, tschuett, mgorny, stellaraccident, 
mizvekov, ldionne.
Herald added subscribers: StephenFan, jdoerfert.
Mordante published this revision for review.
Herald added subscribers: llvm-commits, libcxx-commits, openmp-commits, 
lldb-commits, Sanitizers, cfe-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

This is a preparation to require CMake 3.20.0 after LLVM 16 has been
released.

This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137724

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  openmp/CMakeLists.txt
  polly/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,5 +1,12 @@
 # This file handles building LLVM runtime sub-projects.
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM will become 3.20.0, and "
+"using an older CMake will become an error. Please upgrade your CMake to "
+"at least 3.20.0 now to avoid issues in the future!")
+endif()
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -2,6 +2,13 @@
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
   cmake_minimum_required(VERSION 3.13.4)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/CMakeLists.txt
===
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -12,6 +12,13 @@
 if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   set(OPENMP_STANDALONE_BUILD TRUE)
   project(openmp C CXX)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: mlir/CMakeLists.txt
===
--- mlir/CMakeLists.txt
+++ mlir/CMakeLists.txt
@@ -11,6 +11,13 @@
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   project(mlir)
   set(MLIR_STANDALONE_BUILD TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: llvm/docs/ReleaseNotes.rst
===
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -64,6 +64,17 @@
 * Apple Clang >= 10.0
 * Visual Studio 2019 >= 16.7
 
+With LLVM 16.x we will raise the version requirement of CMake used to build
+LLVM. The new requirements are as follows:
+
+* CMake >= 3.20.0
+
+In LLVM 16.x 

[Lldb-commits] [PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added inline comments.



Comment at: llvm/docs/DeveloperPolicy.rst:129
+
+  People interested in joining the vendors group can do so by clicking the
+  "Join Project" link on the vendor's "Members" page in Phabricator.

aaron.ballman wrote:
> Mordante wrote:
> > 
> I didn't apply this one because I think it's grammatically correct without 
> the comma.
I looks slightly odd to me, but I'm not a native speaker.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134878/new/

https://reviews.llvm.org/D134878

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


[Lldb-commits] [PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Mark de Wever via Phabricator via lldb-commits
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.

Thanks a lot for working on this! A few small nits, otherwise LGTM.




Comment at: llvm/docs/DeveloperPolicy.rst:112
+
+Please help notify users of potential disruptions when upgrading to a newer
+version of a tool. For example, deprecating a feature that is expected to be





Comment at: llvm/docs/DeveloperPolicy.rst:129
+
+  People interested in joining the vendors group can do so by clicking the
+  "Join Project" link on the vendor's "Members" page in Phabricator.





Comment at: llvm/docs/DeveloperPolicy.rst:150
+  Discourse, and add the label to one of the watch categories under
+  ``Notifications->Tags``
+




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134878/new/

https://reviews.llvm.org/D134878

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


[Lldb-commits] [PATCH] D123580: [libc++] Use bit field for checking if string is in long or short mode

2022-06-28 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added inline comments.



Comment at: libcxx/utils/gdb/libcxx/printers.py:192
 
 class StdStringPrinter(object):
 """Print a std::string."""

labath wrote:
> Mordante wrote:
> > ldionne wrote:
> > > philnik wrote:
> > > > labath wrote:
> > > > > philnik wrote:
> > > > > > dblaikie wrote:
> > > > > > > philnik wrote:
> > > > > > > > jgorbe wrote:
> > > > > > > > > Mordante wrote:
> > > > > > > > > > philnik wrote:
> > > > > > > > > > > Mordante wrote:
> > > > > > > > > > > > philnik wrote:
> > > > > > > > > > > > > Mordante wrote:
> > > > > > > > > > > > > > Does this also break the LLDB pretty printer?
> > > > > > > > > > > > > Probably. Would be nice to have a test runner for 
> > > > > > > > > > > > > that.
> > > > > > > > > > > > I already planned to look into that, D97044#3440904 ;-)
> > > > > > > > > > > Do you know where I would have to look to know what the 
> > > > > > > > > > > LLDB pretty printers do?
> > > > > > > > > > Unfortunately no. @jingham seems to be the Data formatter 
> > > > > > > > > > code owner.
> > > > > > > > > There was a recent lldb change fixing prettyprinters after a 
> > > > > > > > > similar change to string: 
> > > > > > > > > https://github.com/llvm/llvm-project/commit/45428412fd7c9900d3d6ac9803aa7dcf6adfa6fe
> > > > > > > > > 
> > > > > > > > > If the gdb prettyprinter needed fixing for this change, 
> > > > > > > > > chances are that lldb will need a similar update too.
> > > > > > > > Could someone from #lldb help me figure out what to change in 
> > > > > > > > the pretty printers? I looked at the file, but I don't really 
> > > > > > > > understand how it works and TBH I don't really feel like 
> > > > > > > > spending a lot of time figuring it out. If nobody says anything 
> > > > > > > > I'll land this in a week.
> > > > > > > > 
> > > > > > > > As a side note: it would be really nice if there were a few 
> > > > > > > > more comments inside `LibCxx.cpp` to explain what happens 
> > > > > > > > there. That would make fixing the pretty printer a lot easier. 
> > > > > > > > The code is probably not very hard (at least it doesn't look 
> > > > > > > > like it), but I am looking for a few things that I can't find 
> > > > > > > > and I have no idea what some of the things mean.
> > > > > > > Looks like something around 
> > > > > > > https://github.com/llvm/llvm-project/blob/2e6ac54cf48aa04f7b05c382c33135b16d3f01ea/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp#L597
> > > > > > >  (& the similar masking in the `else` block a few lines down) - I 
> > > > > > > guess a specific lookup for the new field would be needed, rather 
> > > > > > > than the bitmasking.
> > > > > > Yes, but what do the numbers in `size_mode_locations` mean? Why is 
> > > > > > there no checking if it's big or little endian? Is it unsupported 
> > > > > > maybe? Does it work because of something else? Is there a reason 
> > > > > > that `g_data_name` exists instead of comparing directly? Should I 
> > > > > > add another layout style or should I just update the code for the 
> > > > > > new layout?
> > > > > > I don't know anything about the LLDB codebase, so I don't 
> > > > > > understand the code and I don't know how I should change it.
> > > > > I don't think there's been any official policy decision either way, 
> > > > > but historically we haven't been asking libc++ authors to update lldb 
> > > > > pretty printers -- we would just fix them up on the lldb side when we 
> > > > > noticed the change. The thing that has changed recently is that 
> > > > > google started relying (and testing) more on lldb, which considerably 
> > > > > shortened the time it takes to notice this change, and also makes it 
> > > > > difficult for some people to make progress while we are in this 
> > > > > state. But I don't think that means that updating the pretty printer 
> > > > > is suddenly your responsibility.
> > > > > 
> > > > > As for your questions, I'll try to answer them as best as I can:
> > > > > > what do the numbers in size_mode_locations mean?
> > > > > These are the indexes of fields in the string object. For some reason 
> > > > > (unknown to me), the pretty printer uses indexes rather than field 
> > > > > names for its work. Prompted by the previous patch, I've been trying 
> > > > > to change that, but I haven't done it yet, as I was trying to improve 
> > > > > the testing story (more on that later).
> > > > > > Why is there no checking if it's big or little endian? Is it 
> > > > > > unsupported maybe?
> > > > > Most likely yes. Although most parts of lldb support big endian, I am 
> > > > > not aware of anyone testing it on a regular basis, so it's quite 
> > > > > likely that a lot of things are in fact broken.
> > > > > > Is there a reason that g_data_name exists instead of comparing 
> > > > > > directly?
> > > > > LLDB uses a global string pool, so this is an attempt to reduce the 
> > > > > number of string pool queries. The pattern 

[Lldb-commits] [PATCH] D123580: [libc++] Use bit field for checking if string is in long or short mode

2022-06-28 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added inline comments.



Comment at: libcxx/utils/gdb/libcxx/printers.py:192
 
 class StdStringPrinter(object):
 """Print a std::string."""

ldionne wrote:
> philnik wrote:
> > labath wrote:
> > > philnik wrote:
> > > > dblaikie wrote:
> > > > > philnik wrote:
> > > > > > jgorbe wrote:
> > > > > > > Mordante wrote:
> > > > > > > > philnik wrote:
> > > > > > > > > Mordante wrote:
> > > > > > > > > > philnik wrote:
> > > > > > > > > > > Mordante wrote:
> > > > > > > > > > > > Does this also break the LLDB pretty printer?
> > > > > > > > > > > Probably. Would be nice to have a test runner for that.
> > > > > > > > > > I already planned to look into that, D97044#3440904 ;-)
> > > > > > > > > Do you know where I would have to look to know what the LLDB 
> > > > > > > > > pretty printers do?
> > > > > > > > Unfortunately no. @jingham seems to be the Data formatter code 
> > > > > > > > owner.
> > > > > > > There was a recent lldb change fixing prettyprinters after a 
> > > > > > > similar change to string: 
> > > > > > > https://github.com/llvm/llvm-project/commit/45428412fd7c9900d3d6ac9803aa7dcf6adfa6fe
> > > > > > > 
> > > > > > > If the gdb prettyprinter needed fixing for this change, chances 
> > > > > > > are that lldb will need a similar update too.
> > > > > > Could someone from #lldb help me figure out what to change in the 
> > > > > > pretty printers? I looked at the file, but I don't really 
> > > > > > understand how it works and TBH I don't really feel like spending a 
> > > > > > lot of time figuring it out. If nobody says anything I'll land this 
> > > > > > in a week.
> > > > > > 
> > > > > > As a side note: it would be really nice if there were a few more 
> > > > > > comments inside `LibCxx.cpp` to explain what happens there. That 
> > > > > > would make fixing the pretty printer a lot easier. The code is 
> > > > > > probably not very hard (at least it doesn't look like it), but I am 
> > > > > > looking for a few things that I can't find and I have no idea what 
> > > > > > some of the things mean.
> > > > > Looks like something around 
> > > > > https://github.com/llvm/llvm-project/blob/2e6ac54cf48aa04f7b05c382c33135b16d3f01ea/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp#L597
> > > > >  (& the similar masking in the `else` block a few lines down) - I 
> > > > > guess a specific lookup for the new field would be needed, rather 
> > > > > than the bitmasking.
> > > > Yes, but what do the numbers in `size_mode_locations` mean? Why is 
> > > > there no checking if it's big or little endian? Is it unsupported 
> > > > maybe? Does it work because of something else? Is there a reason that 
> > > > `g_data_name` exists instead of comparing directly? Should I add 
> > > > another layout style or should I just update the code for the new 
> > > > layout?
> > > > I don't know anything about the LLDB codebase, so I don't understand 
> > > > the code and I don't know how I should change it.
> > > I don't think there's been any official policy decision either way, but 
> > > historically we haven't been asking libc++ authors to update lldb pretty 
> > > printers -- we would just fix them up on the lldb side when we noticed 
> > > the change. The thing that has changed recently is that google started 
> > > relying (and testing) more on lldb, which considerably shortened the time 
> > > it takes to notice this change, and also makes it difficult for some 
> > > people to make progress while we are in this state. But I don't think 
> > > that means that updating the pretty printer is suddenly your 
> > > responsibility.
> > > 
> > > As for your questions, I'll try to answer them as best as I can:
> > > > what do the numbers in size_mode_locations mean?
> > > These are the indexes of fields in the string object. For some reason 
> > > (unknown to me), the pretty printer uses indexes rather than field names 
> > > for its work. Prompted by the previous patch, I've been trying to change 
> > > that, but I haven't done it yet, as I was trying to improve the testing 
> > > story (more on that later).
> > > > Why is there no checking if it's big or little endian? Is it 
> > > > unsupported maybe?
> > > Most likely yes. Although most parts of lldb support big endian, I am not 
> > > aware of anyone testing it on a regular basis, so it's quite likely that 
> > > a lot of things are in fact broken.
> > > > Is there a reason that g_data_name exists instead of comparing directly?
> > > LLDB uses a global string pool, so this is an attempt to reduce the 
> > > number of string pool queries. The pattern is not consistently used 
> > > everywhere, and overall, I wouldn't be too worried about it.
> > > > Should I add another layout style or should I just update the code for 
> > > > the new layout?
> > > As the pretty printers ship with lldb, they are expected to support not 
> > > just the current format, but also the past ones (within reason). This is 
> > > what makes 

[Lldb-commits] [PATCH] D116224: Revert "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-04 Thread Mark de Wever via Phabricator via lldb-commits
Mordante requested changes to this revision.
Mordante added a comment.
This revision now requires changes to proceed.

This revision reverts more than intended. Since it now touches libcxx directory 
it requires libc++ approval.
Please reduce the revert to the intended scope.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116224/new/

https://reviews.llvm.org/D116224

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


[Lldb-commits] [PATCH] D107717: [LLVM][CMake][NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project

2021-09-21 Thread Mark de Wever via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2c319fdc6b3: [LLVM][CMake][NFC] Resolve FIXME: Rename 
LLVM_CMAKE_PATH to LLVM_CMAKE_DIR… (authored by gAlfonso-bit, committed by 
Mordante).
Herald added a project: LLDB.
Herald added a reviewer: libunwind.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107717/new/

https://reviews.llvm.org/D107717

Files:
  clang/CMakeLists.txt
  clang/lib/Basic/CMakeLists.txt
  compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
  compiler-rt/cmake/Modules/CompilerRTUtils.cmake
  flang/CMakeLists.txt
  libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
  libunwind/CMakeLists.txt
  lld/CMakeLists.txt
  lld/Common/CMakeLists.txt
  lldb/cmake/modules/LLDBStandalone.cmake
  lldb/source/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/include/llvm/Support/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -76,7 +76,7 @@
 
 # This variable makes sure that e.g. llvm-lit is found.
 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../llvm)
-set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
+set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules)
 
 # This variable is used by individual runtimes to locate LLVM files.
 set(LLVM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../llvm)
Index: llvm/include/llvm/Support/CMakeLists.txt
===
--- llvm/include/llvm/Support/CMakeLists.txt
+++ llvm/include/llvm/Support/CMakeLists.txt
@@ -3,7 +3,7 @@
 # The VC revision include that we want to generate.
 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h")
 
-set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
+set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
 
 if(LLVM_APPEND_VC_REV)
   set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
Index: llvm/CMakeLists.txt
===
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -295,8 +295,8 @@
 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
 set(LLVM_BINARY_DIR   ${CMAKE_CURRENT_BINARY_DIR}  ) # --prefix
 
-# Note: LLVM_CMAKE_PATH does not include generated files
-set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
+# Note: LLVM_CMAKE_DIR does not include generated files
+set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules)
 set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
 set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
 
Index: lldb/source/CMakeLists.txt
===
--- lldb/source/CMakeLists.txt
+++ lldb/source/CMakeLists.txt
@@ -8,7 +8,7 @@
 find_first_existing_vc_file("${LLDB_SOURCE_DIR}" lldb_vc)
 
 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
-set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
+set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
 
 if(lldb_vc AND LLVM_APPEND_VC_REV)
   set(lldb_source_dir ${LLDB_SOURCE_DIR})
Index: lldb/cmake/modules/LLDBStandalone.cmake
===
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -3,8 +3,8 @@
 find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH)
 find_package(Clang REQUIRED CONFIG HINTS ${Clang_DIR} ${LLVM_DIR}/../clang NO_CMAKE_FIND_ROOT_PATH)
 
-# We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc
-set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules")
+# We set LLVM_CMAKE_DIR so that GetSVN.cmake is found correctly when building SVNVersion.inc
+set(LLVM_CMAKE_DIR ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules")
 
 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
Index: lld/Common/CMakeLists.txt
===
--- lld/Common/CMakeLists.txt
+++ lld/Common/CMakeLists.txt
@@ -8,7 +8,7 @@
 find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
 
 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
-set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
+set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
 
 if(lld_vc AND LLVM_APPEND_VC_REV)
   set(lld_source_dir ${LLD_SOURCE_DIR})
Index: lld/CMakeLists.txt
===
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -27,7 +27,7 @@
 
   list(GET LLVM_CONFIG_OUTPUT 0 OBJ_ROOT)
   list(GET LLVM_CONFIG_OUTPUT 1 MAIN_INCLUDE_DIR)
-  list(GET LLVM_CONFIG_OUTPUT 

[Lldb-commits] [PATCH] D107717: [LLVM][CMake][NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project

2021-09-07 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

Since @ldionne approved this patch it's good to land. If you don't have commit 
access, can you provide "Your name" , then somebody can 
commit the change for you.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107717/new/

https://reviews.llvm.org/D107717

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


[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-06 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D71857#1800663 , @MaskRay wrote:

> I think there is a false positive.
>
> https://github.com/llvm/llvm-project/tree/master/lld/ELF/Relocations.cpp#L1622
>
>   for (const std::pair ts : isd->thunkSections)
>   


Removing the `const` like L1648 will also solve the issue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857



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


[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-02 Thread Mark de Wever via Phabricator via lldb-commits
Mordante added a comment.

In D71857#1800663 , @MaskRay wrote:

> However, I am afraid I don't like some of the fixes here. You can replace 
> `const auto` with `const auto &` and call that a fix... IMHO if the type is 
> not obvious, `const ConcreteType &` will be better.


I notice some parts of the code prefer `auto` and others `ConcreteType`, so 
there is no consensus on what is the best. I feel with this change I want to 
change as little as possible.

> I think there is a false positive.
> 
> https://github.com/llvm/llvm-project/tree/master/lld/ELF/Relocations.cpp#L1622
> 
>   for (const std::pair ts : isd->thunkSections)
>
> 
> Diagnostic:
> 
>   lld/ELF/Relocations.cpp:1622:14: note: use reference type 'const 
> std::pair &' (aka 'const 
> pair &') to prevent copying
>   for (const std::pair ts : 
> isd->thunkSections)
>   
> 
> 
> i.e. The diagnostic asks me to replace `const std::pair` with 
> `const std::pair &`, when it is clear that the type is cheap to 
> copy.

The code has a 'protection' for this case `clang/lib/Sema/SemaStmt.cpp:2803`:

  // TODO: Determine a maximum size that a POD type can be before a diagnostic
  // should be emitted.  Also, only ignore POD types with trivial copy
  // constructors.
  if (VariableType.isPODType(SemaRef.Context))
return;

I could change this protection to test whether the type is trivially copyable 
which will reduce the number of warnings. Unfortunately std::pair is not 
trivially copyable so that won't help here. Do you think it makes sense to 
allow trivially copyable types instead of POD types? Any suggestion how we 
could solve it for std::pair?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857



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


[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-02 Thread Mark de Wever via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8dc7b982b455: [NFC] Fixes -Wrange-loop-analysis warnings 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857

Files:
  clang-tools-extra/clang-doc/MDGenerator.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
  clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
  clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
  clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
  clang-tools-extra/clangd/index/MemIndex.cpp
  clang/lib/CodeGen/CodeGenPGO.cpp
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
  clang/lib/Tooling/ASTDiff/ASTDiff.cpp
  clang/tools/clang-refactor/TestSupport.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
  lldb/source/Plugins/Platform/Android/AdbClient.cpp
  lldb/source/Target/StackFrameRecognizer.cpp
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/Analysis/LoopInfoImpl.h
  llvm/include/llvm/Support/GenericDomTree.h
  llvm/lib/Analysis/DomTreeUpdater.cpp
  llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/CodeGen/InlineSpiller.cpp
  llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
  llvm/lib/CodeGen/RegAllocFast.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
  llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
  llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
  llvm/lib/IR/TypeFinder.cpp
  llvm/lib/Linker/IRMover.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
  llvm/lib/MCA/Stages/InstructionTables.cpp
  llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
  llvm/lib/Support/CommandLine.cpp
  llvm/lib/Support/TargetParser.cpp

Index: llvm/lib/Support/TargetParser.cpp
===
--- llvm/lib/Support/TargetParser.cpp
+++ llvm/lib/Support/TargetParser.cpp
@@ -132,7 +132,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN(StringRef CPU) {
-  for (const auto C : AMDGCNGPUs) {
+  for (const auto  : AMDGCNGPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -141,7 +141,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchR600(StringRef CPU) {
-  for (const auto C : R600GPUs) {
+  for (const auto  : R600GPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -163,12 +163,12 @@
 
 void AMDGPU::fillValidArchListAMDGCN(SmallVectorImpl ) {
   // XXX: Should this only report unique canonical names?
-  for (const auto C : AMDGCNGPUs)
+  for (const auto  : AMDGCNGPUs)
 Values.push_back(C.Name);
 }
 
 void AMDGPU::fillValidArchListR600(SmallVectorImpl ) {
-  for (const auto C : R600GPUs)
+  for (const auto  : R600GPUs)
 Values.push_back(C.Name);
 }
 
Index: llvm/lib/Support/CommandLine.cpp
===
--- llvm/lib/Support/CommandLine.cpp
+++ llvm/lib/Support/CommandLine.cpp
@@ -187,7 +187,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto *Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addLiteralOption(Opt, Sub, Name);
@@ -243,7 +243,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto *Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addOption(O, Sub);
@@ -318,7 +318,7 @@
   }
 
   bool hasOptions() const {
-for (const auto  : RegisteredSubCommands) {
+for (const auto *S : RegisteredSubCommands) {
   if (hasOptions(*S))
 return true;
 }
@@ -2112,7 +2112,7 @@
 static void
 sortSubCommands(const SmallPtrSetImpl ,
 SmallVectorImpl> ) {
-  for (const auto  : SubMap) {
+  for (auto *S : SubMap) {
 if (S->getName().empty())
   continue;
 Subs.push_back(std::make_pair(S->getName().data(), S));
Index: llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
===
--- llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
+++ llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
@@ -421,7 +421,7 @@
   for (const auto  : Lines.Blocks) {
 Result->createBlock(LC.FileName);
 if (Result->hasColumnInfo()) {
-  for (const auto  : zip(LC.Lines, LC.Columns)) {
+  for (auto Item : zip(LC.Lines, LC.Columns)) {
 auto  = std::get<0>(Item);
 auto  = std::get<1>(Item);
 

[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via lldb-commits
Mordante updated this revision to Diff 235763.
Mordante retitled this revision from "Fixes -Wrange-loop-analysis warnings" to 
"[NFC] Fixes -Wrange-loop-analysis warnings".
Mordante added a comment.

Reviewed the types and added a `*` for pointers and added a `const` when 
applicable.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857

Files:
  clang-tools-extra/clang-doc/MDGenerator.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
  clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
  clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
  clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
  clang-tools-extra/clangd/index/MemIndex.cpp
  clang/lib/CodeGen/CodeGenPGO.cpp
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
  clang/lib/Tooling/ASTDiff/ASTDiff.cpp
  clang/tools/clang-refactor/TestSupport.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
  lldb/source/Plugins/Platform/Android/AdbClient.cpp
  lldb/source/Target/StackFrameRecognizer.cpp
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/Analysis/LoopInfoImpl.h
  llvm/include/llvm/Support/GenericDomTree.h
  llvm/lib/Analysis/DomTreeUpdater.cpp
  llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/CodeGen/InlineSpiller.cpp
  llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
  llvm/lib/CodeGen/RegAllocFast.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
  llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
  llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
  llvm/lib/IR/TypeFinder.cpp
  llvm/lib/Linker/IRMover.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
  llvm/lib/MCA/Stages/InstructionTables.cpp
  llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
  llvm/lib/Support/CommandLine.cpp
  llvm/lib/Support/TargetParser.cpp

Index: llvm/lib/Support/TargetParser.cpp
===
--- llvm/lib/Support/TargetParser.cpp
+++ llvm/lib/Support/TargetParser.cpp
@@ -132,7 +132,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN(StringRef CPU) {
-  for (const auto C : AMDGCNGPUs) {
+  for (const auto  : AMDGCNGPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -141,7 +141,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchR600(StringRef CPU) {
-  for (const auto C : R600GPUs) {
+  for (const auto  : R600GPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -163,12 +163,12 @@
 
 void AMDGPU::fillValidArchListAMDGCN(SmallVectorImpl ) {
   // XXX: Should this only report unique canonical names?
-  for (const auto C : AMDGCNGPUs)
+  for (const auto  : AMDGCNGPUs)
 Values.push_back(C.Name);
 }
 
 void AMDGPU::fillValidArchListR600(SmallVectorImpl ) {
-  for (const auto C : R600GPUs)
+  for (const auto  : R600GPUs)
 Values.push_back(C.Name);
 }
 
Index: llvm/lib/Support/CommandLine.cpp
===
--- llvm/lib/Support/CommandLine.cpp
+++ llvm/lib/Support/CommandLine.cpp
@@ -187,7 +187,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto *Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addLiteralOption(Opt, Sub, Name);
@@ -243,7 +243,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto *Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addOption(O, Sub);
@@ -318,7 +318,7 @@
   }
 
   bool hasOptions() const {
-for (const auto  : RegisteredSubCommands) {
+for (const auto *S : RegisteredSubCommands) {
   if (hasOptions(*S))
 return true;
 }
@@ -2112,7 +2112,7 @@
 static void
 sortSubCommands(const SmallPtrSetImpl ,
 SmallVectorImpl> ) {
-  for (const auto  : SubMap) {
+  for (auto *S : SubMap) {
 if (S->getName().empty())
   continue;
 Subs.push_back(std::make_pair(S->getName().data(), S));
Index: llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
===
--- llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
+++ llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
@@ -421,7 +421,7 @@
   for (const auto  : Lines.Blocks) {
 Result->createBlock(LC.FileName);
 if (Result->hasColumnInfo()) {
-  for (const auto  : zip(LC.Lines, LC.Columns)) {
+  for (auto Item : zip(LC.Lines, LC.Columns)) {

[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via lldb-commits
Mordante marked 8 inline comments as done.
Mordante added inline comments.



Comment at: 
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp:22
 
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/Log.h"

xbolva00 wrote:
> NFC patch?
Changed to NFC.



Comment at: 
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp:75
 return false;
-  for (const auto  : call_inst->operand_values())
+  for (auto param : call_inst->operand_values())
 if (isRSAllocationPtrTy(param->getType()))

aaron.ballman wrote:
> `auto *`?
Changed to  `const auto *`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857



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


[Lldb-commits] [PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via lldb-commits
Mordante marked 2 inline comments as done.
Mordante added a comment.

Thanks for the review! I'll commit all the -Wrange-loop-analysis patches later 
today.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857



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


[Lldb-commits] [PATCH] D71857: Fixes -Wrange-loop-analysis warnings

2019-12-24 Thread Mark de Wever via Phabricator via lldb-commits
Mordante created this revision.
Mordante added reviewers: aaron.ballman, xbolva00.
Mordante added projects: LLVM, LLDB, clang.
Herald added subscribers: bmahjour, usaxena95, kadircet, arphaman, jkorous, 
kbarton, hiraditya, nemanjai, qcolombet, MatzeB.

This avoids new warnings due to D68912  adds 
-Wrange-loop-analysis to -Wall.

This should be the last cleanup patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71857

Files:
  clang-tools-extra/clang-doc/MDGenerator.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
  clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
  clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
  clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
  clang-tools-extra/clangd/index/MemIndex.cpp
  clang/lib/CodeGen/CodeGenPGO.cpp
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
  clang/lib/Tooling/ASTDiff/ASTDiff.cpp
  clang/tools/clang-refactor/TestSupport.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
  lldb/source/Plugins/Platform/Android/AdbClient.cpp
  lldb/source/Target/StackFrameRecognizer.cpp
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/Analysis/LoopInfoImpl.h
  llvm/include/llvm/Support/GenericDomTree.h
  llvm/lib/Analysis/DomTreeUpdater.cpp
  llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/CodeGen/InlineSpiller.cpp
  llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
  llvm/lib/CodeGen/RegAllocFast.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
  llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
  llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
  llvm/lib/IR/TypeFinder.cpp
  llvm/lib/Linker/IRMover.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
  llvm/lib/MCA/Stages/InstructionTables.cpp
  llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
  llvm/lib/Support/CommandLine.cpp
  llvm/lib/Support/TargetParser.cpp

Index: llvm/lib/Support/TargetParser.cpp
===
--- llvm/lib/Support/TargetParser.cpp
+++ llvm/lib/Support/TargetParser.cpp
@@ -132,7 +132,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN(StringRef CPU) {
-  for (const auto C : AMDGCNGPUs) {
+  for (const auto  : AMDGCNGPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -141,7 +141,7 @@
 }
 
 AMDGPU::GPUKind llvm::AMDGPU::parseArchR600(StringRef CPU) {
-  for (const auto C : R600GPUs) {
+  for (const auto  : R600GPUs) {
 if (CPU == C.Name)
   return C.Kind;
   }
@@ -163,12 +163,12 @@
 
 void AMDGPU::fillValidArchListAMDGCN(SmallVectorImpl ) {
   // XXX: Should this only report unique canonical names?
-  for (const auto C : AMDGCNGPUs)
+  for (const auto  : AMDGCNGPUs)
 Values.push_back(C.Name);
 }
 
 void AMDGPU::fillValidArchListR600(SmallVectorImpl ) {
-  for (const auto C : R600GPUs)
+  for (const auto  : R600GPUs)
 Values.push_back(C.Name);
 }
 
Index: llvm/lib/Support/CommandLine.cpp
===
--- llvm/lib/Support/CommandLine.cpp
+++ llvm/lib/Support/CommandLine.cpp
@@ -187,7 +187,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addLiteralOption(Opt, Sub, Name);
@@ -243,7 +243,7 @@
 // If we're adding this to all sub-commands, add it to the ones that have
 // already been registered.
 if (SC == &*AllSubCommands) {
-  for (const auto  : RegisteredSubCommands) {
+  for (auto Sub : RegisteredSubCommands) {
 if (SC == Sub)
   continue;
 addOption(O, Sub);
@@ -318,7 +318,7 @@
   }
 
   bool hasOptions() const {
-for (const auto  : RegisteredSubCommands) {
+for (auto S : RegisteredSubCommands) {
   if (hasOptions(*S))
 return true;
 }
@@ -2112,7 +2112,7 @@
 static void
 sortSubCommands(const SmallPtrSetImpl ,
 SmallVectorImpl> ) {
-  for (const auto  : SubMap) {
+  for (auto S : SubMap) {
 if (S->getName().empty())
   continue;
 Subs.push_back(std::make_pair(S->getName().data(), S));
Index: llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
===
--- llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
+++ llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
@@ -421,7 +421,7 @@
   for (const auto  : Lines.Blocks) {
 Result->createBlock(LC.FileName);
 if (Result->hasColumnInfo()) {
-  for (const auto  :