Skip to content

Commit e1fb4ca

Browse files
authored
Merge branch 'main' into vkd1
2 parents 14a4472 + 32b821c commit e1fb4ca

Some content is hidden

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

44 files changed

+314
-1440
lines changed

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ void MicrosoftCXXNameMangler::mangleFloat(llvm::APFloat Number) {
10141014
case APFloat::S_x87DoubleExtended: Out << 'X'; break;
10151015
case APFloat::S_IEEEquad: Out << 'Y'; break;
10161016
case APFloat::S_PPCDoubleDouble: Out << 'Z'; break;
1017+
case APFloat::S_PPCDoubleDoubleLegacy:
10171018
case APFloat::S_Float8E5M2:
10181019
case APFloat::S_Float8E4M3:
10191020
case APFloat::S_Float8E4M3FN:

clang/lib/Driver/ToolChains/Fuchsia.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,19 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
156156
addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs);
157157
AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
158158

159+
// Sample these options first so they are claimed even under -nostdlib et al.
160+
bool NoLibc = Args.hasArg(options::OPT_nolibc);
161+
bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) &&
162+
!Args.hasArg(options::OPT_static);
163+
bool Pthreads = Args.hasArg(options::OPT_pthread, options::OPT_pthreads);
164+
bool SplitStack = Args.hasArg(options::OPT_fsplit_stack);
159165
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs,
160166
options::OPT_r)) {
161167
if (Args.hasArg(options::OPT_static))
162168
CmdArgs.push_back("-Bdynamic");
163169

164170
if (D.CCCIsCXX()) {
165171
if (ToolChain.ShouldLinkCXXStdlib(Args)) {
166-
bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) &&
167-
!Args.hasArg(options::OPT_static);
168172
CmdArgs.push_back("--push-state");
169173
CmdArgs.push_back("--as-needed");
170174
if (OnlyLibstdcxxStatic)
@@ -188,14 +192,13 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
188192

189193
AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
190194

191-
if (Args.hasArg(options::OPT_pthread) ||
192-
Args.hasArg(options::OPT_pthreads))
195+
if (Pthreads)
193196
CmdArgs.push_back("-lpthread");
194197

195-
if (Args.hasArg(options::OPT_fsplit_stack))
198+
if (SplitStack)
196199
CmdArgs.push_back("--wrap=pthread_create");
197200

198-
if (!Args.hasArg(options::OPT_nolibc))
201+
if (!NoLibc)
199202
CmdArgs.push_back("-lc");
200203
}
201204

@@ -229,7 +232,7 @@ void fuchsia::StaticLibTool::ConstructJob(Compilation &C, const JobAction &JA,
229232

230233
for (const auto &II : Inputs) {
231234
if (II.isFilename()) {
232-
CmdArgs.push_back(II.getFilename());
235+
CmdArgs.push_back(II.getFilename());
233236
}
234237
}
235238

@@ -343,16 +346,14 @@ std::string Fuchsia::ComputeEffectiveClangTriple(const ArgList &Args,
343346
return Triple.str();
344347
}
345348

346-
Tool *Fuchsia::buildLinker() const {
347-
return new tools::fuchsia::Linker(*this);
348-
}
349+
Tool *Fuchsia::buildLinker() const { return new tools::fuchsia::Linker(*this); }
349350

350351
Tool *Fuchsia::buildStaticLibTool() const {
351352
return new tools::fuchsia::StaticLibTool(*this);
352353
}
353354

354-
ToolChain::RuntimeLibType Fuchsia::GetRuntimeLibType(
355-
const ArgList &Args) const {
355+
ToolChain::RuntimeLibType
356+
Fuchsia::GetRuntimeLibType(const ArgList &Args) const {
356357
if (Arg *A = Args.getLastArg(clang::driver::options::OPT_rtlib_EQ)) {
357358
StringRef Value = A->getValue();
358359
if (Value != "compiler-rt")
@@ -363,13 +364,12 @@ ToolChain::RuntimeLibType Fuchsia::GetRuntimeLibType(
363364
return ToolChain::RLT_CompilerRT;
364365
}
365366

366-
ToolChain::CXXStdlibType
367-
Fuchsia::GetCXXStdlibType(const ArgList &Args) const {
367+
ToolChain::CXXStdlibType Fuchsia::GetCXXStdlibType(const ArgList &Args) const {
368368
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
369369
StringRef Value = A->getValue();
370370
if (Value != "libc++")
371371
getDriver().Diag(diag::err_drv_invalid_stdlib_name)
372-
<< A->getAsString(Args);
372+
<< A->getAsString(Args);
373373
}
374374

375375
return ToolChain::CST_Libcxx;

clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ __global__ void kernel4(struct S s) {
432432
// CHECK-SPIRV-NEXT: ret void
433433
//
434434
// OPT-LABEL: define dso_local amdgpu_kernel void @_Z7kernel5P1S(
435-
// OPT-SAME: ptr addrspace(1) nocapture noundef readonly [[S_COERCE:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] {
435+
// OPT-SAME: ptr addrspace(1) nocapture noundef readonly [[S_COERCE:%.*]]) local_unnamed_addr #[[ATTR2]] {
436436
// OPT-NEXT: [[ENTRY:.*:]]
437437
// OPT-NEXT: [[TMP0:%.*]] = load ptr, ptr addrspace(1) [[S_COERCE]], align 8
438438
// OPT-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4

clang/test/Driver/fuchsia.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,9 @@
297297
// RUN: %clang --target=riscv64-unknown-fuchsia -mno-relax -### %s 2>&1 \
298298
// RUN: | FileCheck -check-prefix=RISCV64-FLAGS %s
299299
// RISCV64-FLAGS: "-X" "--no-relax"
300+
301+
// RUN: %clang -### %s --target=x86_64-unknown-fuchsia 2>&1 \
302+
// RUN: -nostdlib -nolibc \
303+
// RUN: | FileCheck %s -check-prefix=CHECK-NOSTDLIB-NOLIBC
304+
// CHECK-NOSTDLIB-NOLIBC-NOT: "warning:"
305+
// CHECK-NOSTDLIB-NOLIBC-NOT: "error:"

flang/test/Evaluate/fold-ieee.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module m
5858
logical, parameter :: test_sn_all = ieee_support_subnormal()
5959
logical, parameter :: test_sn_4 = ieee_support_subnormal(1.)
6060
logical, parameter :: test_sn_8 = ieee_support_subnormal(1.d0)
61-
! logical, parameter :: test_uc_all = .not. ieee_support_underflow_control() ! varies by architecture
61+
! logical, parameter :: test_uc_all = .not. ieee_support_underflow_control()
6262
! logical, parameter :: test_uc_4 = ieee_support_underflow_control(1.)
6363
! logical, parameter :: test_uc_8 = ieee_support_underflow_control(1.d0)
6464
end

libc/docs/fenv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/setjmp.rst

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
.. include:: check.rst
22

3-
setjmp.h Functions
4-
==================
3+
========
4+
setjmp.h
5+
========
6+
7+
Macros
8+
======
9+
10+
.. list-table::
11+
:widths: auto
12+
:align: center
13+
:header-rows: 1
14+
15+
* - Macro
16+
- Implemented
17+
- C23 Standard Section
18+
- POSIX.1-2017 Standard Section
19+
* - __STDC_VERSION_SETJMP_H__
20+
-
21+
- 7.13.2
22+
-
23+
24+
Functions
25+
=========
526

627
.. list-table::
728
:widths: auto
@@ -10,7 +31,13 @@ setjmp.h Functions
1031

1132
* - Function
1233
- Implemented
13-
- Standard
34+
- C23 Standard Section
35+
- POSIX.1-2017 Standard Section
1436
* - longjmp
1537
- |check|
1638
- 7.13.2.1
39+
-
40+
* - setjmp
41+
- |check|
42+
- 7.13.1.1
43+
-

libc/docs/signal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/stdbit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/threads.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

0 commit comments

Comments
 (0)