Skip to content

Commit 85a90d1

Browse files
committed
Merge remote-tracking branch 'upstream/release/21.x' into rustc/21.1-2025-08-01
2 parents 89bab96 + 2078da4 commit 85a90d1

File tree

14 files changed

+188
-34
lines changed

14 files changed

+188
-34
lines changed

.github/workflows/hlsl-test-all.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ jobs:
5252
repository: llvm/offload-golden-images
5353
ref: main
5454
path: golden-images
55-
- name: Setup Windows
56-
if: runner.os == 'Windows'
57-
uses: llvm/actions/setup-windows@main
58-
with:
59-
arch: amd64
6055
- name: Build DXC
6156
run: |
6257
cd DXC

.github/workflows/libclang-abi-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ jobs:
101101
ref: ${{ github.sha }}
102102
repo: ${{ github.repository }}
103103
steps:
104-
- name: Install Ninja
105-
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
106104
- name: Download source code
107105
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
108106
with:

.github/workflows/llvm-project-tests.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ on:
3737
os_list:
3838
required: false
3939
type: string
40-
# Use windows-2019 due to:
41-
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
42-
default: '["ubuntu-24.04", "windows-2019", "macOS-13"]'
40+
default: '["ubuntu-24.04"]'
4341

4442
python_version:
4543
required: false
@@ -67,11 +65,6 @@ jobs:
6765
matrix:
6866
os: ${{ fromJSON(inputs.os_list) }}
6967
steps:
70-
- name: Setup Windows
71-
if: startsWith(matrix.os, 'windows')
72-
uses: llvm/actions/setup-windows@main
73-
with:
74-
arch: amd64
7568
# On Windows, starting with win19/20220814.1, cmake choose the 32-bit
7669
# python3.10.6 libraries instead of the 64-bit libraries when building
7770
# lldb. Using this setup-python action to make 3.10 the default
@@ -80,9 +73,6 @@ jobs:
8073
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
8174
with:
8275
python-version: ${{ inputs.python_version }}
83-
- name: Install Ninja
84-
if: runner.os != 'Linux'
85-
uses: llvm/actions/install-ninja@main
8676
# actions/checkout deletes any existing files in the new git directory,
8777
# so this needs to either run before ccache-action or it has to use
8878
# clean: false.

.github/workflows/premerge.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ jobs:
146146
with:
147147
max-size: "2000M"
148148
- name: Install Ninja
149-
uses: llvm/actions/install-ninja@main
149+
run: |
150+
brew install ninja
150151
- name: Build and Test
151152
run: |
152153
source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py)

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,6 @@ jobs:
199199
with:
200200
ref: ${{ needs.prepare.outputs.ref }}
201201

202-
- name: Install Ninja
203-
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main
204-
205-
- name: Setup Windows
206-
if: startsWith(runner.os, 'Windows')
207-
uses: llvm/actions/setup-windows@main
208-
with:
209-
arch: amd64
210-
211202
- name: Set Build Prefix
212203
id: setup-stage
213204
shell: bash

clang/lib/ExtractAPI/DeclarationFragments.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,10 @@ DeclarationFragmentsBuilder::getFragmentsForParam(const ParmVarDecl *Param) {
636636
DeclarationFragments::FragmentKind::InternalParam);
637637
} else {
638638
Fragments.append(std::move(TypeFragments));
639-
if (!T->isAnyPointerType() && !T->isBlockPointerType())
639+
// If the type is a type alias, append the space
640+
// even if the underlying type is a pointer type.
641+
if (T->isTypedefNameType() ||
642+
(!T->isAnyPointerType() && !T->isBlockPointerType()))
640643
Fragments.appendSpace();
641644
Fragments
642645
.append(Param->getName(),

clang/test/ExtractAPI/typedef.c

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: rm -rf %t
2-
// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
2+
// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -fblocks \
33
// RUN: -triple arm64-apple-macosx -x objective-c-header %s -o %t/output.symbols.json -verify
44

55
// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix MYINT
@@ -90,4 +90,83 @@ void foo(BarPtr value);
9090
void baz(BarPtr *value);
9191
// CHECK-NOT: struct Bar *
9292

93+
// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix BLOCKPTR
94+
typedef int (^CustomType)(const unsigned int *, unsigned long);
95+
void bar(CustomType block);
96+
97+
// BLOCKPTR-LABEL: "!testLabel": "c:@F@bar",
98+
// BLOCKPTR: "declarationFragments": [
99+
// BLOCKPTR-NEXT: {
100+
// BLOCKPTR-NEXT: "kind": "typeIdentifier",
101+
// BLOCKPTR-NEXT: "preciseIdentifier": "c:v",
102+
// BLOCKPTR-NEXT: "spelling": "void"
103+
// BLOCKPTR-NEXT: },
104+
// BLOCKPTR-NEXT: {
105+
// BLOCKPTR-NEXT: "kind": "text",
106+
// BLOCKPTR-NEXT: "spelling": " "
107+
// BLOCKPTR-NEXT: },
108+
// BLOCKPTR-NEXT: {
109+
// BLOCKPTR-NEXT: "kind": "identifier",
110+
// BLOCKPTR-NEXT: "spelling": "bar"
111+
// BLOCKPTR-NEXT: },
112+
// BLOCKPTR-NEXT: {
113+
// BLOCKPTR-NEXT: "kind": "text",
114+
// BLOCKPTR-NEXT: "spelling": "("
115+
// BLOCKPTR-NEXT: },
116+
// BLOCKPTR-NEXT: {
117+
// BLOCKPTR-NEXT: "kind": "typeIdentifier",
118+
// BLOCKPTR-NEXT: "preciseIdentifier": "c:typedef.c@T@CustomType",
119+
// BLOCKPTR-NEXT: "spelling": "CustomType"
120+
// BLOCKPTR-NEXT: },
121+
// BLOCKPTR-NEXT: {
122+
// BLOCKPTR-NEXT: "kind": "text",
123+
// BLOCKPTR-NEXT: "spelling": " "
124+
// BLOCKPTR-NEXT: },
125+
// BLOCKPTR-NEXT: {
126+
// BLOCKPTR-NEXT: "kind": "internalParam",
127+
// BLOCKPTR-NEXT: "spelling": "block"
128+
// BLOCKPTR-NEXT: },
129+
// BLOCKPTR-NEXT: {
130+
// BLOCKPTR-NEXT: "kind": "text",
131+
// BLOCKPTR-NEXT: "spelling": ");"
132+
// BLOCKPTR-NEXT: }
133+
// BLOCKPTR-NEXT: ],
134+
// BLOCKPTR-NEXT: "functionSignature": {
135+
// BLOCKPTR-NEXT: "parameters": [
136+
// BLOCKPTR-NEXT: {
137+
// BLOCKPTR-NEXT: "declarationFragments": [
138+
// BLOCKPTR-NEXT: {
139+
// BLOCKPTR-NEXT: "kind": "typeIdentifier",
140+
// BLOCKPTR-NEXT: "preciseIdentifier": "c:typedef.c@T@CustomType",
141+
// BLOCKPTR-NEXT: "spelling": "CustomType"
142+
// BLOCKPTR-NEXT: },
143+
// BLOCKPTR-NEXT: {
144+
// BLOCKPTR-NEXT: "kind": "text",
145+
// BLOCKPTR-NEXT: "spelling": " "
146+
// BLOCKPTR-NEXT: },
147+
// BLOCKPTR-NEXT: {
148+
// BLOCKPTR-NEXT: "kind": "internalParam",
149+
// BLOCKPTR-NEXT: "spelling": "block"
150+
// BLOCKPTR-NEXT: }
151+
// BLOCKPTR-NEXT: ],
152+
// BLOCKPTR-NEXT: "name": "block"
153+
// BLOCKPTR-NEXT: }
154+
// BLOCKPTR-NEXT: ],
155+
// BLOCKPTR-NEXT: "returns": [
156+
// BLOCKPTR-NEXT: {
157+
// BLOCKPTR-NEXT: "kind": "typeIdentifier",
158+
// BLOCKPTR-NEXT: "preciseIdentifier": "c:v",
159+
// BLOCKPTR-NEXT: "spelling": "void"
160+
// BLOCKPTR-NEXT: }
161+
// BLOCKPTR-NEXT: ]
162+
// BLOCKPTR-NEXT: },
163+
// BLOCKPTR: "identifier": {
164+
// BLOCKPTR-NEXT: "interfaceLanguage": "objective-c",
165+
// BLOCKPTR-NEXT: "precise": "c:@F@bar"
166+
// BLOCKPTR-NEXT: },
167+
// BLOCKPTR: "kind": {
168+
// BLOCKPTR-NEXT: "displayName": "Function",
169+
// BLOCKPTR-NEXT: "identifier": "objective-c.func"
170+
// BLOCKPTR-NEXT: },
171+
93172
// expected-no-diagnostics

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ uptr GetPageSize() {
12871287

12881288
uptr ReadBinaryName(/*out*/ char *buf, uptr buf_len) {
12891289
# if SANITIZER_HAIKU
1290-
int cookie = 0;
1290+
int32_t cookie = 0;
12911291
image_info info;
12921292
const char *argv0 = "<UNKNOWN>";
12931293
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
@@ -1987,7 +1987,10 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const {
19871987
# elif SANITIZER_NETBSD
19881988
uptr err = ucontext->uc_mcontext.__gregs[_REG_ERR];
19891989
# elif SANITIZER_HAIKU
1990-
uptr err = ucontext->uc_mcontext.r13;
1990+
uptr err = 0; // FIXME: ucontext->uc_mcontext.r13;
1991+
// The err register was added on the main branch and not
1992+
// available with the current release. To be reverted later.
1993+
// https://github.com/haiku/haiku/commit/11adda21aa4e6b24f71a496868a44d7607bc3764
19911994
# elif SANITIZER_SOLARIS && defined(__i386__)
19921995
const int Err = 13;
19931996
uptr err = ucontext->uc_mcontext.gregs[Err];
@@ -2617,6 +2620,11 @@ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
26172620
*pc = ucontext->uc_mcontext.mc_eip;
26182621
*bp = ucontext->uc_mcontext.mc_ebp;
26192622
*sp = ucontext->uc_mcontext.mc_esp;
2623+
# elif SANITIZER_HAIKU
2624+
ucontext_t *ucontext = (ucontext_t *)context;
2625+
*pc = ucontext->uc_mcontext.eip;
2626+
*bp = ucontext->uc_mcontext.ebp;
2627+
*sp = ucontext->uc_mcontext.esp;
26202628
# else
26212629
ucontext_t *ucontext = (ucontext_t *)context;
26222630
# if SANITIZER_SOLARIS

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ typedef unsigned long __sanitizer_sigset_t;
629629
# elif SANITIZER_APPLE
630630
typedef unsigned __sanitizer_sigset_t;
631631
# elif SANITIZER_HAIKU
632-
typedef unsigned long __sanitizer_sigset_t;
632+
typedef unsigned long long __sanitizer_sigset_t;
633633
# elif SANITIZER_LINUX
634634
struct __sanitizer_sigset_t {
635635
// The size is determined by looking at sizeof of real sigset_t on linux.

llvm/lib/CodeGen/SelectOptimize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static Value *getTrueOrFalseValue(
502502
} else {
503503
assert((isa<AShrOperator>(AuxI) || isa<SExtInst>(AuxI)) &&
504504
"Unexpected opcode");
505-
CBO->setOperand(CondIdx, ConstantInt::get(CBO->getType(), -1));
505+
CBO->setOperand(CondIdx, ConstantInt::getAllOnesValue(CBO->getType()));
506506
}
507507

508508
unsigned OtherIdx = 1 - CondIdx;

0 commit comments

Comments
 (0)