Skip to content

Commit 5aaffd4

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:a1f1371fdc7d9af9edf32339dcfebada96d937a5 into amd-gfx:45668192a2fc
Local branch amd-gfx 4566819 Merged main:eaa32d20a2612370371047140734e91f8f22dea1 into amd-gfx:7be0dd27ca83 Remote branch main a1f1371 [X86][NFC] Remove redundant constraints in X86InstrArithmetic.td after llvm#76319
2 parents 4566819 + a1f1371 commit 5aaffd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1495
-826
lines changed

clang-tools-extra/clangd/InlayHints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ std::string summarizeExpr(const Expr *E) {
286286
// Step through implicit nodes that clang doesn't classify as such.
287287
std::string VisitCXXMemberCallExpr(const CXXMemberCallExpr *E) {
288288
// Call to operator bool() inside if (X): dispatch to X.
289-
if (E->getNumArgs() == 0 &&
289+
if (E->getNumArgs() == 0 && E->getMethodDecl() &&
290290
E->getMethodDecl()->getDeclName().getNameKind() ==
291291
DeclarationName::CXXConversionFunctionName &&
292292
E->getSourceRange() ==

clang-tools-extra/clangd/unittests/InlayHintTests.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,19 @@ TEST(BlockEndHints, Macro) {
22052205
ExpectedHint{" // struct S1", "S1"});
22062206
}
22072207

2208+
TEST(BlockEndHints, PointerToMemberFunction) {
2209+
// Do not crash trying to summarize `a->*p`.
2210+
assertBlockEndHints(R"cpp(
2211+
class A {};
2212+
using Predicate = bool(A::*)();
2213+
void foo(A* a, Predicate p) {
2214+
if ((a->*p)()) {
2215+
$ptrmem[[}]]
2216+
} // suppress
2217+
)cpp",
2218+
ExpectedHint{" // if", "ptrmem"});
2219+
}
2220+
22082221
// FIXME: Low-hanging fruit where we could omit a type hint:
22092222
// - auto x = TypeName(...);
22102223
// - auto x = (TypeName) (...);

clang/test/Driver/fbasic-block-sections.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
2-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-ALL %s
3-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list=%s %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LIST %s
4-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=labels %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LABELS %s
5-
// RUN: not %clang -c -target arm-unknown-linux -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
6-
// RUN: %clang -### -target arm-unknown-linux -fbasic-block-sections=all -fbasic-block-sections=none %s -S 2>&1 \
1+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
2+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-ALL %s
3+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=list=%s %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LIST %s
4+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=labels %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LABELS %s
5+
// RUN: not %clang -c --target=arm-unknown-linux -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
6+
// RUN: %clang -### --target=arm-unknown-linux -fbasic-block-sections=all -fbasic-block-sections=none %s -S 2>&1 \
77
// RUN: | FileCheck -check-prefix=CHECK-NOOPT %s
8-
// RUN: not %clang -c -target x86_64-apple-darwin10 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
9-
// RUN: not %clang -### -target x86_64 -fbasic-block-sections=alll %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
10-
// RUN: not %clang -### -target x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
11-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list= %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NULL-LIST %s
12-
// RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
8+
// RUN: not %clang -c --target=x86_64-apple-darwin10 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
9+
// RUN: not %clang -### --target=x86_64 -fbasic-block-sections=alll %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
10+
// RUN: not %clang -### --target=x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
11+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=list= %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NULL-LIST %s
12+
// RUN: %clang -### --target=x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
1313
// RUN: %clang -### -x cuda -nocudainc -nocudalib --target=x86_64 -fbasic-block-sections=all --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s -c 2>&1 \
1414
// RUN: | FileCheck -check-prefix=CHECK-CUDA %s
1515

compiler-rt/lib/asan/asan_linux.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
# include "asan_premap_shadow.h"
3434
# include "asan_thread.h"
3535
# include "sanitizer_common/sanitizer_flags.h"
36-
# include "sanitizer_common/sanitizer_freebsd.h"
3736
# include "sanitizer_common/sanitizer_hash.h"
3837
# include "sanitizer_common/sanitizer_libc.h"
3938
# include "sanitizer_common/sanitizer_procmaps.h"
@@ -59,13 +58,6 @@ extern Elf_Dyn _DYNAMIC;
5958
extern ElfW(Dyn) _DYNAMIC[];
6059
# endif
6160

62-
// x86-64 FreeBSD 9.2 and older define 'ucontext_t' incorrectly in
63-
// 32-bit mode.
64-
# if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32) && \
65-
__FreeBSD_version <= 902001 // v9.2
66-
# define ucontext_t xucontext_t
67-
# endif
68-
6961
typedef enum {
7062
ASAN_RT_VERSION_UNDEFINED = 0,
7163
ASAN_RT_VERSION_DYNAMIC,

compiler-rt/lib/asan/asan_new_delete.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ COMMENT_EXPORT("??_V@YAXPAX@Z") // operator delete[]
4848

4949
using namespace __asan;
5050

51-
// FreeBSD prior v9.2 have wrong definition of 'size_t'.
52-
// http://svnweb.freebsd.org/base?view=revision&revision=232261
53-
#if SANITIZER_FREEBSD && SANITIZER_WORDSIZE == 32
54-
#include <sys/param.h>
55-
#if __FreeBSD_version <= 902001 // v9.2
56-
#define size_t unsigned
57-
#endif // __FreeBSD_version
58-
#endif // SANITIZER_FREEBSD && SANITIZER_WORDSIZE == 32
59-
6051
// This code has issues on OSX.
6152
// See https://github.com/google/sanitizers/issues/131.
6253

compiler-rt/lib/builtins/cpu_model/aarch64.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ _Bool __aarch64_have_lse_atomics
3434
__attribute__((visibility("hidden"), nocommon)) = false;
3535

3636
#if defined(__FreeBSD__)
37+
// clang-format off: should not reorder sys/auxv.h alphabetically
38+
#include <sys/auxv.h>
39+
// clang-format on
3740
#include "aarch64/hwcap.inc"
3841
#include "aarch64/lse_atomics/freebsd.inc"
3942
#elif defined(__Fuchsia__)

compiler-rt/lib/builtins/fp_lib.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
#include <stdbool.h>
2727
#include <stdint.h>
2828

29-
// x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in
30-
// 32-bit mode.
31-
#if defined(__FreeBSD__) && defined(__i386__)
32-
#include <sys/param.h>
33-
#if __FreeBSD_version < 903000 // v9.3
34-
#define uint64_t unsigned long long
35-
#define int64_t long long
36-
#undef UINT64_C
37-
#define UINT64_C(c) (c##ULL)
38-
#endif
39-
#endif
40-
4129
#if defined SINGLE_PRECISION
4230

4331
typedef uint16_t half_rep_t;

compiler-rt/lib/memprof/memprof_linux.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "memprof_internal.h"
2121
#include "memprof_thread.h"
2222
#include "sanitizer_common/sanitizer_flags.h"
23-
#include "sanitizer_common/sanitizer_freebsd.h"
2423
#include "sanitizer_common/sanitizer_libc.h"
2524
#include "sanitizer_common/sanitizer_procmaps.h"
2625

compiler-rt/lib/sanitizer_common/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ set(SANITIZER_IMPL_HEADERS
151151
sanitizer_flags.h
152152
sanitizer_flags.inc
153153
sanitizer_flat_map.h
154-
sanitizer_freebsd.h
155154
sanitizer_fuchsia.h
156155
sanitizer_getauxval.h
157156
sanitizer_hash.h

compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h

Lines changed: 0 additions & 137 deletions
This file was deleted.

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
# include <sched.h>
5959
# include <signal.h>
6060
# include <sys/mman.h>
61-
# include <sys/param.h>
6261
# if !SANITIZER_SOLARIS
6362
# include <sys/ptrace.h>
6463
# endif
@@ -136,9 +135,7 @@ const int FUTEX_WAKE_PRIVATE = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
136135
# define SANITIZER_LINUX_USES_64BIT_SYSCALLS 0
137136
# endif
138137

139-
// Note : FreeBSD had implemented both
140-
// Linux apis, available from
141-
// future 12.x version most likely
138+
// Note : FreeBSD implemented both Linux and OpenBSD apis.
142139
# if SANITIZER_LINUX && defined(__NR_getrandom)
143140
# if !defined(GRND_NONBLOCK)
144141
# define GRND_NONBLOCK 1
@@ -148,10 +145,8 @@ const int FUTEX_WAKE_PRIVATE = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
148145
# define SANITIZER_USE_GETRANDOM 0
149146
# endif // SANITIZER_LINUX && defined(__NR_getrandom)
150147

151-
# if SANITIZER_FREEBSD && __FreeBSD_version >= 1200000
148+
# if SANITIZER_FREEBSD
152149
# define SANITIZER_USE_GETENTROPY 1
153-
# else
154-
# define SANITIZER_USE_GETENTROPY 0
155150
# endif
156151

157152
namespace __sanitizer {

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# include "sanitizer_common.h"
2222
# include "sanitizer_file.h"
2323
# include "sanitizer_flags.h"
24-
# include "sanitizer_freebsd.h"
2524
# include "sanitizer_getauxval.h"
2625
# include "sanitizer_glibc_version.h"
2726
# include "sanitizer_linux.h"
@@ -46,7 +45,6 @@
4645
# endif
4746

4847
# if SANITIZER_FREEBSD
49-
# include <osreldate.h>
5048
# include <pthread_np.h>
5149
# include <sys/auxv.h>
5250
# include <sys/sysctl.h>
@@ -629,11 +627,7 @@ void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
629627

630628
# if !SANITIZER_FREEBSD
631629
typedef ElfW(Phdr) Elf_Phdr;
632-
# elif SANITIZER_WORDSIZE == 32 && __FreeBSD_version <= 902001 // v9.2
633-
# define Elf_Phdr XElf32_Phdr
634-
# define dl_phdr_info xdl_phdr_info
635-
# define dl_iterate_phdr(c, b) xdl_iterate_phdr((c), (b))
636-
# endif // !SANITIZER_FREEBSD
630+
# endif
637631

638632
struct DlIteratePhdrData {
639633
InternalMmapVectorNoCtor<LoadedModule> *modules;

compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
#include "sanitizer_platform.h"
1414
#if SANITIZER_FREEBSD || SANITIZER_NETBSD
1515
#include "sanitizer_common.h"
16-
#if SANITIZER_FREEBSD
17-
#include "sanitizer_freebsd.h"
18-
#endif
1916
#include "sanitizer_procmaps.h"
2017

2118
// clang-format off
@@ -29,14 +26,6 @@
2926

3027
#include <limits.h>
3128

32-
// Fix 'kinfo_vmentry' definition on FreeBSD prior v9.2 in 32-bit mode.
33-
#if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32)
34-
#include <osreldate.h>
35-
#if __FreeBSD_version <= 902001 // v9.2
36-
#define kinfo_vmentry xkinfo_vmentry
37-
#endif
38-
#endif
39-
4029
namespace __sanitizer {
4130

4231
#if SANITIZER_FREEBSD

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 484872
19+
#define LLVM_MAIN_REVISION 484889
2020

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

0 commit comments

Comments
 (0)