Skip to content

Commit 9571c4a

Browse files
committed
Merge from 'main' to 'sycl-web' (173 commits)
CONFLICT (content): Merge conflict in llvm/include/llvm/CodeGen/CodeGenPassBuilder.h CONFLICT (content): Merge conflict in llvm/include/llvm/CodeGen/MachinePassRegistry.def
2 parents 25ade5b + cd6e462 commit 9571c4a

File tree

698 files changed

+20313
-9567
lines changed

Some content is hidden

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

698 files changed

+20313
-9567
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81
6767

6868
# [libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
6969
4c198542226223f6a5c5511a1f89b37d15ee10b9
70+
71+
# [libc++] Replace uses of _VSTD:: by std:: (#74331)
72+
77a00c0d546cd4aa8311b5b9031ae9ea8cdb050c

bolt/lib/Core/Exceptions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ void BinaryFunction::parseLSDA(ArrayRef<uint8_t> LSDASectionData,
108108
DWARFDataExtractor Data(
109109
StringRef(reinterpret_cast<const char *>(LSDASectionData.data()),
110110
LSDASectionData.size()),
111-
BC.DwCtx->getDWARFObj().isLittleEndian(), 8);
111+
BC.DwCtx->getDWARFObj().isLittleEndian(),
112+
BC.DwCtx->getDWARFObj().getAddressSize());
112113
uint64_t Offset = getLSDAAddress() - LSDASectionAddress;
113114
assert(Data.isValidOffset(Offset) && "wrong LSDA address");
114115

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,9 @@ void RewriteInstance::parseBuildID() {
623623

624624
// Reading notes section (see Portable Formats Specification, Version 1.1,
625625
// pg 2-5, section "Note Section").
626-
DataExtractor DE = DataExtractor(Buf, true, 8);
626+
DataExtractor DE =
627+
DataExtractor(Buf,
628+
/*IsLittleEndian=*/true, InputFile->getBytesInAddress());
627629
uint64_t Offset = 0;
628630
if (!DE.isValidOffset(Offset))
629631
return;

clang-tools-extra/clang-doc/Mapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ llvm::SmallString<128> MapASTVisitor::getFile(const NamedDecl *D,
103103
.getPresumedLoc(D->getBeginLoc())
104104
.getFilename());
105105
IsFileInRootDir = false;
106-
if (RootDir.empty() || !File.startswith(RootDir))
106+
if (RootDir.empty() || !File.starts_with(RootDir))
107107
return File;
108108
IsFileInRootDir = true;
109109
llvm::SmallString<128> Prefix(RootDir);

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void ExpandModularHeadersPPCallbacks::InclusionDirective(
171171
if (Imported) {
172172
serialization::ModuleFile *MF =
173173
Compiler.getASTReader()->getModuleManager().lookup(
174-
Imported->getASTFile());
174+
*Imported->getASTFile());
175175
handleModuleFile(MF);
176176
}
177177
parseToLocation(DirectiveLoc);

clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void IncludeCleanerCheck::check(const MatchFinder::MatchResult &Result) {
124124
MainFileDecls.push_back(D);
125125
}
126126
llvm::DenseSet<include_cleaner::Symbol> SeenSymbols;
127-
const DirectoryEntry *ResourceDir =
127+
OptionalDirectoryEntryRef ResourceDir =
128128
PP->getHeaderSearchInfo().getModuleMap().getBuiltinDir();
129129
// FIXME: Find a way to have less code duplication between include-cleaner
130130
// analysis implementation and the below code.

clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "clang/Basic/DiagnosticIDs.h"
2121
#include "clang/Basic/LLVM.h"
2222
#include "clang/Basic/SourceLocation.h"
23+
#include "llvm/ADT/STLForwardCompat.h"
2324
#include "llvm/ADT/SmallVector.h"
2425
#include "llvm/Support/Casting.h"
2526
#include "llvm/Support/ErrorHandling.h"
@@ -167,15 +168,13 @@ static const std::array<const StringRef, 4> Msgs = {{
167168
// Criteria is a bitset, thus a few helpers are needed.
168169
CognitiveComplexity::Criteria operator|(CognitiveComplexity::Criteria LHS,
169170
CognitiveComplexity::Criteria RHS) {
170-
return static_cast<CognitiveComplexity::Criteria>(
171-
static_cast<std::underlying_type_t<CognitiveComplexity::Criteria>>(LHS) |
172-
static_cast<std::underlying_type_t<CognitiveComplexity::Criteria>>(RHS));
171+
return static_cast<CognitiveComplexity::Criteria>(llvm::to_underlying(LHS) |
172+
llvm::to_underlying(RHS));
173173
}
174174
CognitiveComplexity::Criteria operator&(CognitiveComplexity::Criteria LHS,
175175
CognitiveComplexity::Criteria RHS) {
176-
return static_cast<CognitiveComplexity::Criteria>(
177-
static_cast<std::underlying_type_t<CognitiveComplexity::Criteria>>(LHS) &
178-
static_cast<std::underlying_type_t<CognitiveComplexity::Criteria>>(RHS));
176+
return static_cast<CognitiveComplexity::Criteria>(llvm::to_underlying(LHS) &
177+
llvm::to_underlying(RHS));
179178
}
180179
CognitiveComplexity::Criteria &operator|=(CognitiveComplexity::Criteria &LHS,
181180
CognitiveComplexity::Criteria RHS) {

clang-tools-extra/clangd/IncludeCleaner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ IncludeCleanerFindings computeIncludeCleanerFindings(ParsedAST &AST) {
397397
std::vector<MissingIncludeDiagInfo> MissingIncludes;
398398
llvm::DenseSet<IncludeStructure::HeaderID> Used;
399399
trace::Span Tracer("include_cleaner::walkUsed");
400-
const DirectoryEntry *ResourceDir = AST.getPreprocessor()
401-
.getHeaderSearchInfo()
402-
.getModuleMap()
403-
.getBuiltinDir();
400+
OptionalDirectoryEntryRef ResourceDir = AST.getPreprocessor()
401+
.getHeaderSearchInfo()
402+
.getModuleMap()
403+
.getBuiltinDir();
404404
include_cleaner::walkUsed(
405405
AST.getLocalTopLevelDecls(), /*MacroRefs=*/Macros,
406406
AST.getPragmaIncludes().get(), AST.getPreprocessor(),

clang-tools-extra/include-cleaner/lib/Analysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ analyze(llvm::ArrayRef<Decl *> ASTRoots,
8787
llvm::StringSet<> Missing;
8888
if (!HeaderFilter)
8989
HeaderFilter = [](llvm::StringRef) { return false; };
90-
const DirectoryEntry *ResourceDir =
90+
OptionalDirectoryEntryRef ResourceDir =
9191
PP.getHeaderSearchInfo().getModuleMap().getBuiltinDir();
9292
walkUsed(ASTRoots, MacroRefs, PI, PP,
9393
[&](const SymbolReference &Ref, llvm::ArrayRef<Header> Providers) {
9494
bool Satisfied = false;
9595
for (const Header &H : Providers) {
9696
if (H.kind() == Header::Physical &&
9797
(H.physical() == MainFile ||
98-
H.physical().getDir() == ResourceDir)) {
98+
(ResourceDir && H.physical().getDir() == *ResourceDir))) {
9999
Satisfied = true;
100100
}
101101
for (const Include *I : Inc.match(H)) {
@@ -114,7 +114,7 @@ analyze(llvm::ArrayRef<Decl *> ASTRoots,
114114
for (const Include &I : Inc.all()) {
115115
if (Used.contains(&I) || !I.Resolved ||
116116
HeaderFilter(I.Resolved->getFileEntry().tryGetRealPathName()) ||
117-
I.Resolved->getFileEntry().getDir() == ResourceDir)
117+
(ResourceDir && I.Resolved->getFileEntry().getDir() == *ResourceDir))
118118
continue;
119119
if (PI) {
120120
if (PI->shouldKeep(*I.Resolved))

clang-tools-extra/modularize/ModuleAssistant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static bool addModuleDescription(Module *RootModule,
175175
llvm::SmallString<256> NativePath, NativePrefix;
176176
llvm::sys::path::native(HeaderFilePath, NativePath);
177177
llvm::sys::path::native(HeaderPrefix, NativePrefix);
178-
if (NativePath.startswith(NativePrefix))
178+
if (NativePath.starts_with(NativePrefix))
179179
FilePath = std::string(NativePath.substr(NativePrefix.size() + 1));
180180
else
181181
FilePath = std::string(HeaderFilePath);

0 commit comments

Comments
 (0)