Skip to content

Commit b7007c9

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:cbff02b101c2 into amd-gfx:fd35e8e70c0b
Local branch amd-gfx fd35e8e Merged main:11e482c4a32b into amd-gfx:176390732d3e Remote branch main cbff02b [mlir][emitc] Fix invalid syntax in example of emitc.return (llvm#121112)
2 parents fd35e8e + cbff02b commit b7007c9

File tree

9 files changed

+59
-61
lines changed

9 files changed

+59
-61
lines changed

flang/runtime/stop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static void PrintBacktrace() {
162162
// TODO: Need to parse DWARF information to print function line numbers
163163
constexpr int MAX_CALL_STACK{999};
164164
void *buffer[MAX_CALL_STACK];
165-
int nptrs{backtrace(buffer, MAX_CALL_STACK)};
165+
int nptrs{(int)backtrace(buffer, MAX_CALL_STACK)};
166166

167167
if (char **symbols{backtrace_symbols(buffer, nptrs)}) {
168168
for (int i = 0; i < nptrs; i++) {

libcxx/.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Checks: >
55
bugprone-stringview-nullptr,
66
bugprone-use-after-move,
77
8+
libcpp-*,
9+
810
llvm-include-order,
911
llvm-namespace-comment,
1012

libcxx/include/__type_traits/aligned_storage.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,23 @@ struct __struct_double4 {
3434
double __lx[4];
3535
};
3636

37-
// clang-format off
38-
typedef __type_list<__align_type<unsigned char>,
39-
__type_list<__align_type<unsigned short>,
40-
__type_list<__align_type<unsigned int>,
41-
__type_list<__align_type<unsigned long>,
42-
__type_list<__align_type<unsigned long long>,
43-
__type_list<__align_type<double>,
44-
__type_list<__align_type<long double>,
45-
__type_list<__align_type<__struct_double>,
46-
__type_list<__align_type<__struct_double4>,
47-
__type_list<__align_type<int*>,
48-
__nat
49-
> > > > > > > > > > __all_types;
50-
// clang-format on
37+
using __all_types =
38+
__type_list<__align_type<unsigned char>,
39+
__align_type<unsigned short>,
40+
__align_type<unsigned int>,
41+
__align_type<unsigned long>,
42+
__align_type<unsigned long long>,
43+
__align_type<double>,
44+
__align_type<long double>,
45+
__align_type<__struct_double>,
46+
__align_type<__struct_double4>,
47+
__align_type<int*> >;
5148

5249
template <class _TL, size_t _Len>
5350
struct __find_max_align;
5451

55-
template <class _Hp, size_t _Len>
56-
struct __find_max_align<__type_list<_Hp, __nat>, _Len> : public integral_constant<size_t, _Hp::value> {};
52+
template <class _Head, size_t _Len>
53+
struct __find_max_align<__type_list<_Head>, _Len> : public integral_constant<size_t, _Head::value> {};
5754

5855
template <size_t _Len, size_t _A1, size_t _A2>
5956
struct __select_align {
@@ -65,9 +62,11 @@ struct __select_align {
6562
static const size_t value = _Len < __max ? __min : __max;
6663
};
6764

68-
template <class _Hp, class _Tp, size_t _Len>
69-
struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
70-
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
65+
template <class _Head, class... _Tail, size_t _Len>
66+
struct __find_max_align<__type_list<_Head, _Tail...>, _Len>
67+
: public integral_constant<
68+
size_t,
69+
__select_align<_Len, _Head::value, __find_max_align<__type_list<_Tail...>, _Len>::value>::value> {};
7170

7271
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
7372
struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {

libcxx/include/__type_traits/make_signed.h

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,17 @@ template <class _Tp>
2929
using __make_signed_t = __make_signed(_Tp);
3030

3131
#else
32-
// clang-format off
33-
typedef __type_list<signed char,
34-
__type_list<signed short,
35-
__type_list<signed int,
36-
__type_list<signed long,
37-
__type_list<signed long long,
38-
# if _LIBCPP_HAS_INT128
39-
__type_list<__int128_t,
40-
# endif
41-
__nat
32+
using __signed_types =
33+
__type_list<signed char,
34+
signed short,
35+
signed int,
36+
signed long,
37+
signed long long
4238
# if _LIBCPP_HAS_INT128
43-
>
39+
,
40+
__int128_t
4441
# endif
45-
> > > > > __signed_types;
46-
// clang-format on
42+
>;
4743

4844
template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
4945
struct __make_signed{};

libcxx/include/__type_traits/make_unsigned.h

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,17 @@ template <class _Tp>
3131
using __make_unsigned_t = __make_unsigned(_Tp);
3232

3333
#else
34-
// clang-format off
35-
typedef __type_list<unsigned char,
36-
__type_list<unsigned short,
37-
__type_list<unsigned int,
38-
__type_list<unsigned long,
39-
__type_list<unsigned long long,
40-
# if _LIBCPP_HAS_INT128
41-
__type_list<__uint128_t,
42-
# endif
43-
__nat
34+
using __unsigned_types =
35+
__type_list<unsigned char,
36+
unsigned short,
37+
unsigned int,
38+
unsigned long,
39+
unsigned long long
4440
# if _LIBCPP_HAS_INT128
45-
>
41+
,
42+
__uint128_t
4643
# endif
47-
> > > > > __unsigned_types;
48-
// clang-format on
44+
>;
4945

5046
template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
5147
struct __make_unsigned{};

libcxx/include/__type_traits/type_list.h

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,36 @@
1111

1212
#include <__config>
1313
#include <__cstddef/size_t.h>
14+
#include <__type_traits/enable_if.h>
1415

1516
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1617
# pragma GCC system_header
1718
#endif
1819

1920
_LIBCPP_BEGIN_NAMESPACE_STD
2021

21-
template <class _Hp, class _Tp>
22-
struct __type_list {
23-
typedef _Hp _Head;
24-
typedef _Tp _Tail;
22+
template <class... _Types>
23+
struct __type_list {};
24+
25+
template <class>
26+
struct __type_list_head;
27+
28+
template <class _Head, class... _Tail>
29+
struct __type_list_head<__type_list<_Head, _Tail...> > {
30+
using type _LIBCPP_NODEBUG = _Head;
2531
};
2632

27-
template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeList::_Head)>
33+
template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename __type_list_head<_TypeList>::type)>
2834
struct __find_first;
2935

30-
template <class _Hp, class _Tp, size_t _Size>
31-
struct __find_first<__type_list<_Hp, _Tp>, _Size, true> {
32-
using type _LIBCPP_NODEBUG = _Hp;
36+
template <class _Head, class... _Tail, size_t _Size>
37+
struct __find_first<__type_list<_Head, _Tail...>, _Size, true> {
38+
using type _LIBCPP_NODEBUG = _Head;
3339
};
3440

35-
template <class _Hp, class _Tp, size_t _Size>
36-
struct __find_first<__type_list<_Hp, _Tp>, _Size, false> {
37-
using type _LIBCPP_NODEBUG = typename __find_first<_Tp, _Size>::type;
41+
template <class _Head, class... _Tail, size_t _Size>
42+
struct __find_first<__type_list<_Head, _Tail...>, _Size, false> {
43+
using type _LIBCPP_NODEBUG = typename __find_first<__type_list<_Tail...>, _Size>::type;
3844
};
3945

4046
_LIBCPP_END_NAMESPACE_STD

libcxx/test/libcxx/clang_tidy.gen.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
{lit_header_undeprecations.get(header, '')}
3434
3535
// TODO: run clang-tidy with modules enabled once they are supported
36-
// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --checks='-*,libcpp-*' --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- %{{compile_flags}} -fno-modules
37-
// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy -- -Wweak-vtables %{{compile_flags}} -fno-modules
36+
// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{compile_flags}} -fno-modules
3837
3938
#include <{header}>
4039
""")

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 522618
19+
#define LLVM_MAIN_REVISION 522622
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

mlir/include/mlir/Dialect/EmitC/IR/EmitC.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def EmitC_ReturnOp : EmitC_Op<"return", [Pure, HasParent<"FuncOp">,
727727
Example:
728728

729729
```mlir
730-
emitc.func @foo() : (i32) {
730+
emitc.func @foo() -> (i32) {
731731
...
732732
emitc.return %0 : i32
733733
}

0 commit comments

Comments
 (0)