Skip to content

Commit cd3a5cb

Browse files
committed
Merge from 'main' to 'sycl-web' (#1)
2 parents 51a88ed + 85b732b commit cd3a5cb

File tree

541 files changed

+3375
-5545
lines changed

Some content is hidden

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

541 files changed

+3375
-5545
lines changed

clang-tools-extra/clangd/PathMapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ llvm::Optional<std::string> doPathMapping(llvm::StringRef S,
4040
llvm::StringRef Body = Uri->body();
4141
if (Body.consume_front(From) && (Body.empty() || Body.front() == '/')) {
4242
std::string MappedBody = (To + Body).str();
43-
return URI(Uri->scheme(), Uri->authority(), MappedBody.c_str())
43+
return URI(Uri->scheme(), Uri->authority(), MappedBody)
4444
.toString();
4545
}
4646
}

clang/lib/Basic/Targets/PPC.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
264264
}
265265
if (getTriple().isOSAIX()) {
266266
Builder.defineMacro("__THW_PPC__");
267+
// Define __PPC and __powerpc for AIX XL C/C++ compatibility
268+
Builder.defineMacro("__PPC");
269+
Builder.defineMacro("__powerpc");
267270
}
268271

269272
// Target properties.

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18536,8 +18536,7 @@ RValue CodeGenFunction::EmitIntelFPGAMemBuiltin(const CallExpr *E) {
1853618536

1853718537
llvm::Value *Ann = EmitAnnotationCall(F, PtrVal, AnnotStr, SourceLocation());
1853818538

18539-
cast<CallBase>(Ann)->addAttribute(llvm::AttributeList::FunctionIndex,
18540-
llvm::Attribute::ReadNone);
18539+
cast<CallBase>(Ann)->addFnAttr(llvm::Attribute::ReadNone);
1854118540

1854218541
return RValue::get(Ann);
1854318542
}

clang/lib/CodeGen/CGCall.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5353,8 +5353,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
53535353
if (getLangOpts().SYCLIsDevice && CI->doesNotReturn()) {
53545354
if (auto *F = CI->getCalledFunction())
53555355
F->removeFnAttr(llvm::Attribute::NoReturn);
5356-
CI->removeAttribute(llvm::AttributeList::FunctionIndex,
5357-
llvm::Attribute::NoReturn);
5356+
CI->removeFnAttr(llvm::Attribute::NoReturn);
53585357
SyclSkipNoReturn = true;
53595358
}
53605359

clang/lib/Driver/ToolChains/Arch/X86.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ std::string x86::getX86TargetCPU(const Driver &D, const ArgList &Args,
5959
}
6060
StringRef CPU = ArchMap.lookup(A->getValue());
6161
if (CPU.empty()) {
62-
std::vector<StringRef> ValidArchs{ArchMap.keys().begin(),
63-
ArchMap.keys().end()};
62+
std::vector<StringRef> ValidArchs;
63+
for (StringRef Key : ArchMap.keys())
64+
ValidArchs.push_back(Key);
6465
sort(ValidArchs);
6566
D.Diag(diag::warn_drv_invalid_arch_name_with_suggestion)
6667
<< A->getValue() << (Triple.getArch() == llvm::Triple::x86)

clang/lib/Headers/intrin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ unsigned long __readcr8(void);
9797
unsigned int __readdr(unsigned int);
9898
#ifdef __i386__
9999
unsigned char __readfsbyte(unsigned long);
100-
unsigned __int64 __readfsqword(unsigned long);
101100
unsigned short __readfsword(unsigned long);
101+
unsigned long __readfsdword(unsigned long);
102+
unsigned __int64 __readfsqword(unsigned long);
102103
#endif
103104
unsigned __int64 __readmsr(unsigned long);
104105
unsigned __int64 __readpmc(unsigned long);

clang/test/CodeGen/X86/ms-x86-intrinsics.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
1+
// RUN: %clang_cc1 -Werror -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
22
// RUN: -triple i686--windows -Oz -emit-llvm %s -o - \
33
// RUN: | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-I386
4-
// RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
4+
// RUN: %clang_cc1 -Werror -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
55
// RUN: -triple x86_64--windows -Oz -emit-llvm %s -o - \
66
// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-X64
77

8+
#include <intrin.h>
9+
810
#if defined(__i386__)
911
char test__readfsbyte(unsigned long Offset) {
1012
return __readfsbyte(++Offset);

clang/test/Preprocessor/init-ppc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
322322
// PPC:#define __NATURAL_ALIGNMENT__ 1
323323
// PPC:#define __POINTER_WIDTH__ 32
324324
// PPC:#define __POWERPC__ 1
325+
// PPC-NOT:#define __PPC 1
325326
// PPC:#define __PPC__ 1
326327
// PPC:#define __PTRDIFF_TYPE__ long int
327328
// PPC:#define __PTRDIFF_WIDTH__ 32
@@ -386,6 +387,7 @@
386387
// PPC:#define __WCHAR_WIDTH__ 32
387388
// PPC:#define __WINT_TYPE__ int
388389
// PPC:#define __WINT_WIDTH__ 32
390+
// PPC-NOT:#define __powerpc 1
389391
// PPC:#define __ppc__ 1
390392

391393
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s
@@ -520,6 +522,7 @@
520522
// PPC-AIX-NOT:#define __NATURAL_ALIGNMENT__ 1
521523
// PPC-AIX:#define __POINTER_WIDTH__ 32
522524
// PPC-AIX:#define __POWERPC__ 1
525+
// PPC-AIX:#define __PPC 1
523526
// PPC-AIX:#define __PPC__ 1
524527
// PPC-AIX:#define __PTRDIFF_TYPE__ long int
525528
// PPC-AIX:#define __PTRDIFF_WIDTH__ 32
@@ -587,6 +590,7 @@
587590
// PPC-AIX:#define __WCHAR_WIDTH__ 16
588591
// PPC-AIX:#define __WINT_TYPE__ int
589592
// PPC-AIX:#define __WINT_WIDTH__ 32
593+
// PPC-AIX:#define __powerpc 1
590594
// PPC-AIX:#define __powerpc__ 1
591595
// PPC-AIX:#define __ppc__ 1
592596

flang/lib/Semantics/check-declarations.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,12 @@ bool CheckHelper::CheckDefinedOperator(SourceName opName, GenericKind kind,
11521152
return false;
11531153
}
11541154
std::optional<parser::MessageFixedText> msg;
1155+
auto checkDefinedOperatorArgs{
1156+
[&](SourceName opName, const Symbol &specific, const Procedure &proc) {
1157+
bool arg0Defined{CheckDefinedOperatorArg(opName, specific, proc, 0)};
1158+
bool arg1Defined{CheckDefinedOperatorArg(opName, specific, proc, 1)};
1159+
return arg0Defined && arg1Defined;
1160+
}};
11551161
if (specific.attrs().test(Attr::NOPASS)) { // C774
11561162
msg = "%s procedure '%s' may not have NOPASS attribute"_err_en_US;
11571163
} else if (!proc.functionResult.has_value()) {
@@ -1161,8 +1167,7 @@ bool CheckHelper::CheckDefinedOperator(SourceName opName, GenericKind kind,
11611167
" result"_err_en_US;
11621168
} else if (auto m{CheckNumberOfArgs(kind, proc.dummyArguments.size())}) {
11631169
msg = std::move(m);
1164-
} else if (!CheckDefinedOperatorArg(opName, specific, proc, 0) |
1165-
!CheckDefinedOperatorArg(opName, specific, proc, 1)) {
1170+
} else if (!checkDefinedOperatorArgs(opName, specific, proc)) {
11661171
return false; // error was reported
11671172
} else if (ConflictsWithIntrinsicOperator(kind, proc)) {
11681173
msg = "%s function '%s' conflicts with intrinsic operator"_err_en_US;

libcxx/docs/Status/Cxx14.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,3 @@ Library Working Group Issues Status
4848
:file: Cxx14Issues.csv
4949
:header-rows: 1
5050
:widths: auto
51-
52-
Last Updated: 25-Mar-2014

0 commit comments

Comments
 (0)