Skip to content

Commit 973d78c

Browse files
authored
Merge branch 'main' into main
2 parents 2e1f8fd + 81fee74 commit 973d78c

File tree

76 files changed

+1024
-706
lines changed

Some content is hidden

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

76 files changed

+1024
-706
lines changed

bolt/lib/Passes/Instrumentation.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ static bool hasAArch64ExclusiveMemop(
109109
BinaryBasicBlock *BB = BBQueue.front().first;
110110
bool IsLoad = BBQueue.front().second;
111111
BBQueue.pop();
112-
if (Visited.find(BB) != Visited.end())
112+
if (!Visited.insert(BB).second)
113113
continue;
114-
Visited.insert(BB);
115114

116115
for (const MCInst &Inst : *BB) {
117116
// Two loads one after another - skip whole function
@@ -126,8 +125,7 @@ static bool hasAArch64ExclusiveMemop(
126125
if (BC.MIB->isAArch64ExclusiveLoad(Inst))
127126
IsLoad = true;
128127

129-
if (IsLoad && BBToSkip.find(BB) == BBToSkip.end()) {
130-
BBToSkip.insert(BB);
128+
if (IsLoad && BBToSkip.insert(BB).second) {
131129
if (opts::Verbosity >= 2) {
132130
outs() << "BOLT-INSTRUMENTER: skip BB " << BB->getName()
133131
<< " due to exclusive instruction in function "

clang/include/clang/Basic/OpenACCKinds.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ inline StreamTy &printOpenACCGangKind(StreamTy &Out, OpenACCGangKind GK) {
570570
case OpenACCGangKind::Static:
571571
return Out << "static";
572572
}
573+
llvm_unreachable("unknown gang kind");
573574
}
574575
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &Out,
575576
OpenACCGangKind Op) {

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,9 @@ bool Compiler<Emitter>::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {
34163416

34173417
template <class Emitter>
34183418
bool Compiler<Emitter>::VisitBlockExpr(const BlockExpr *E) {
3419+
if (DiscardResult)
3420+
return true;
3421+
34193422
const Function *Func = nullptr;
34203423
if (auto F = Compiler<ByteCodeEmitter>(Ctx, P).compileObjCBlock(E))
34213424
Func = F;

clang/lib/AST/InheritViz.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ void InheritanceHierarchyWriter::WriteNode(QualType Type, bool FromVirtual) {
6363
QualType CanonType = Context.getCanonicalType(Type);
6464

6565
if (FromVirtual) {
66-
if (KnownVirtualBases.find(CanonType) != KnownVirtualBases.end())
66+
if (!KnownVirtualBases.insert(CanonType).second)
6767
return;
6868

6969
// We haven't seen this virtual base before, so display it and
7070
// its bases.
71-
KnownVirtualBases.insert(CanonType);
7271
}
7372

7473
// Declare the node itself.

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,8 @@ class AnnotatingParser {
15511551
// Case D.
15521552
if (Keywords.isVerilogIdentifier(*Prev) && PrevPrev->is(tok::comma)) {
15531553
const FormatToken *PrevParen = PrevPrev->getPreviousNonComment();
1554-
if (PrevParen->is(tok::r_paren) && PrevParen->MatchingParen &&
1554+
if (PrevParen && PrevParen->is(tok::r_paren) &&
1555+
PrevParen->MatchingParen &&
15551556
PrevParen->MatchingParen->is(TT_VerilogInstancePortLParen)) {
15561557
return true;
15571558
}

clang/lib/Sema/SemaAttr.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,12 +750,10 @@ bool Sema::UnifySection(StringRef SectionName, int SectionFlags,
750750
if (auto A = Decl->getAttr<SectionAttr>())
751751
if (A->isImplicit())
752752
PragmaLocation = A->getLocation();
753-
auto SectionIt = Context.SectionInfos.find(SectionName);
754-
if (SectionIt == Context.SectionInfos.end()) {
755-
Context.SectionInfos[SectionName] =
756-
ASTContext::SectionInfo(Decl, PragmaLocation, SectionFlags);
753+
auto [SectionIt, Inserted] = Context.SectionInfos.try_emplace(
754+
SectionName, Decl, PragmaLocation, SectionFlags);
755+
if (Inserted)
757756
return false;
758-
}
759757
// A pre-declared section takes precedence w/o diagnostic.
760758
const auto &Section = SectionIt->second;
761759
if (Section.SectionFlags == SectionFlags ||

clang/test/SemaCXX/block-packs.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -fsyntax-only -verify -Wno-unused %s
22
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -fsyntax-only -verify -Wno-unused %s -frecovery-ast -frecovery-ast-type
33

4+
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -fsyntax-only -verify -Wno-unused -fexperimental-new-constant-interpreter %s
5+
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -fsyntax-only -verify -Wno-unused -frecovery-ast -frecovery-ast-type -fexperimental-new-constant-interpreter %s
6+
47
template <typename ...Ts>
58
void f() {
69
((^ { Ts t; }), ...);

clang/unittests/Format/FormatTestVerilog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@ TEST_F(FormatTestVerilog, Instantiation) {
964964
" .qbar(out1),\n"
965965
" .clear(in1),\n"
966966
" .preset(in2));");
967+
verifyNoCrash(", ff1();");
967968
// With breaking between instance ports disabled.
968969
auto Style = getDefaultStyle();
969970
Style.VerilogBreakBetweenInstancePorts = false;

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,10 +2418,16 @@ void OmpAttributeVisitor::ResolveOmpObject(
24182418
Symbol::Flag::OmpLastPrivate, Symbol::Flag::OmpShared,
24192419
Symbol::Flag::OmpLinear};
24202420

2421-
for (Symbol::Flag ompFlag1 : dataMappingAttributeFlags) {
2422-
for (Symbol::Flag ompFlag2 : dataSharingAttributeFlags) {
2423-
checkExclusivelists(
2424-
hostAssocSym, ompFlag1, symbol, ompFlag2);
2421+
// For OMP TARGET TEAMS directive some sharing attribute
2422+
// flags and mapping attribute flags can co-exist.
2423+
if (!(llvm::omp::allTeamsSet.test(GetContext().directive) ||
2424+
llvm::omp::allParallelSet.test(
2425+
GetContext().directive))) {
2426+
for (Symbol::Flag ompFlag1 : dataMappingAttributeFlags) {
2427+
for (Symbol::Flag ompFlag2 : dataSharingAttributeFlags) {
2428+
checkExclusivelists(
2429+
hostAssocSym, ompFlag1, symbol, ompFlag2);
2430+
}
24252431
}
24262432
}
24272433
}

lldb/source/Host/common/Host.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,7 @@ void Host::SystemLog(Severity severity, llvm::StringRef message) {
111111
syslog(level, "%s", message.data());
112112
}
113113
#else
114-
void Host::SystemLog(Severity severity, llvm::StringRef message) {
115-
switch (severity) {
116-
case lldb::eSeverityInfo:
117-
case lldb::eSeverityWarning:
118-
llvm::outs() << message;
119-
break;
120-
case lldb::eSeverityError:
121-
llvm::errs() << message;
122-
break;
123-
}
124-
}
114+
void Host::SystemLog(Severity severity, llvm::StringRef message) {}
125115
#endif
126116
#endif
127117

0 commit comments

Comments
 (0)