Skip to content

Commit 0af2f78

Browse files
committed
merge main into amd-staging
2 parents 6499690 + 04e5ea5 commit 0af2f78

File tree

90 files changed

+3216
-2153
lines changed

Some content is hidden

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

90 files changed

+3216
-2153
lines changed

clang/lib/AST/VTableBuilder.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,13 @@ void ItaniumVTableBuilder::ComputeThisAdjustments() {
11691169
//
11701170
// Do not set ThunkInfo::Method if Idx is already in VTableThunks. This
11711171
// can happen when covariant return adjustment is required too.
1172-
if (!VTableThunks.count(Idx)) {
1172+
auto [It, Inserted] = VTableThunks.try_emplace(Idx);
1173+
if (Inserted) {
11731174
const CXXMethodDecl *Method = VTables.findOriginalMethodInMap(MD);
1174-
VTableThunks[Idx].Method = Method;
1175-
VTableThunks[Idx].ThisType = Method->getThisType().getTypePtr();
1175+
It->second.Method = Method;
1176+
It->second.ThisType = Method->getThisType().getTypePtr();
11761177
}
1177-
VTableThunks[Idx].This = ThisAdjustment;
1178+
It->second.This = ThisAdjustment;
11781179
};
11791180

11801181
SetThisAdjustmentThunk(VTableIndex);
@@ -1653,8 +1654,9 @@ void ItaniumVTableBuilder::AddMethods(
16531654
// findOriginalMethod to find the method that created the entry if the
16541655
// method in the entry requires adjustment.
16551656
if (!ReturnAdjustment.isEmpty()) {
1656-
VTableThunks[Components.size()].Method = MD;
1657-
VTableThunks[Components.size()].ThisType = MD->getThisType().getTypePtr();
1657+
auto &VTT = VTableThunks[Components.size()];
1658+
VTT.Method = MD;
1659+
VTT.ThisType = MD->getThisType().getTypePtr();
16581660
}
16591661

16601662
AddMethod(Overrider.Method, ReturnAdjustment);

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
14261426
return true;
14271427
return false;
14281428

1429+
case llvm::Triple::csky:
14291430
case llvm::Triple::hexagon:
14301431
case llvm::Triple::msp430:
14311432
case llvm::Triple::ppcle:

clang/lib/Sema/JumpDiagnostics.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,7 @@ void JumpScopeChecker::VerifyIndirectJumps() {
786786
if (CHECK_PERMISSIVE(!LabelAndGotoScopes.count(TheLabel->getStmt())))
787787
continue;
788788
unsigned LabelScope = LabelAndGotoScopes[TheLabel->getStmt()];
789-
if (!TargetScopes.contains(LabelScope))
790-
TargetScopes[LabelScope] = TheLabel;
789+
TargetScopes.try_emplace(LabelScope, TheLabel);
791790
}
792791

793792
// For each target scope, make sure it's trivially reachable from

clang/lib/Serialization/ASTReader.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,11 @@ collectMacroDefinitions(const PreprocessorOptions &PPOpts,
645645

646646
// For an #undef'd macro, we only care about the name.
647647
if (IsUndef) {
648-
if (MacroNames && !Macros.count(MacroName))
648+
auto [It, Inserted] = Macros.try_emplace(MacroName);
649+
if (MacroNames && Inserted)
649650
MacroNames->push_back(MacroName);
650651

651-
Macros[MacroName] = std::make_pair("", true);
652+
It->second = std::make_pair("", true);
652653
continue;
653654
}
654655

@@ -661,9 +662,10 @@ collectMacroDefinitions(const PreprocessorOptions &PPOpts,
661662
MacroBody = MacroBody.substr(0, End);
662663
}
663664

664-
if (MacroNames && !Macros.count(MacroName))
665+
auto [It, Inserted] = Macros.try_emplace(MacroName);
666+
if (MacroNames && Inserted)
665667
MacroNames->push_back(MacroName);
666-
Macros[MacroName] = std::make_pair(MacroBody, false);
668+
It->second = std::make_pair(MacroBody, false);
667669
}
668670
}
669671

clang/test/Driver/csky-toolchain.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// RUN: %clang -### %s --target=csky 2>&1 | FileCheck -check-prefix=CC1 %s
55
// CC1: "-cc1" "-triple" "csky"
6+
// CC1: "-fno-signed-char"
67

78
// In the below tests, --rtlib=platform is used so that the driver ignores
89
// the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib

libcxx/docs/Status/FormatPaper.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Section,Description,Dependencies,Assignee,Status,First released version
22
`P1361 <https://wg21.link/P1361>`__ `P2372 <https://wg21.link/P2372>`__,"Formatting chrono"
33
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::duration<Rep, Period>``",,Mark de Wever,|Complete|,16
44
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::sys_time<Duration>``",,Mark de Wever,|Complete|,17
5-
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::utc_time<Duration>``",A ``<chrono>`` implementation,Mark de Wever,|Complete|,20
5+
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::utc_time<Duration>``",,Mark de Wever,|Complete|,20
66
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::tai_time<Duration>``",,Mark de Wever,|Complete|,21
77
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::gps_time<Duration>``",A ``<chrono>`` implementation,Mark de Wever,,,
88
`[time.syn] <https://wg21.link/time.syn>`_,"Formatter ``chrono::file_time<Duration>``",,Mark de Wever,|Complete|,17

libcxx/include/chrono

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,18 +922,18 @@ strong_ordering operator<=>(const time_zone_link& x, const time_zone_link& y);
922922
} // chrono
923923
924924
namespace std {
925+
template<class Rep, class Period, class charT>
926+
struct formatter<chrono::duration<Rep, Period>, charT>; // C++20
925927
template<class Duration, class charT>
926928
struct formatter<chrono::sys_time<Duration>, charT>; // C++20
927929
template<class Duration, class charT>
928930
struct formatter<chrono::utc_time<Duration>, charT>; // C++20
929931
template<class Duration, class charT>
930932
struct formatter<chrono::tai_time<Duration>, charT>; // C++20
931933
template<class Duration, class charT>
932-
struct formatter<chrono::filetime<Duration>, charT>; // C++20
934+
struct formatter<chrono::file_time<Duration>, charT>; // C++20
933935
template<class Duration, class charT>
934936
struct formatter<chrono::local_time<Duration>, charT>; // C++20
935-
template<class Rep, class Period, class charT>
936-
struct formatter<chrono::duration<Rep, Period>, charT>; // C++20
937937
template<class charT> struct formatter<chrono::day, charT>; // C++20
938938
template<class charT> struct formatter<chrono::month, charT>; // C++20
939939
template<class charT> struct formatter<chrono::year, charT>; // C++20

lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ def test_sb_command_return_object(self):
2424
# return exit code 0 to indicate success. We can let this exception go
2525
# - the test harness will recognize it as a test failure.
2626
subprocess.check_call([self.driver_exe, self.driver_exe])
27+
28+
def test_get_command(self):
29+
res = lldb.SBCommandReturnObject()
30+
self.assertEqual(res.GetCommand(), "")
31+
32+
ci = self.dbg.GetCommandInterpreter()
33+
ci.HandleCommand("help help", res)
34+
self.assertTrue(res.Succeeded())
35+
self.assertEqual(res.GetCommand(), "help help")

lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

llvm/include/llvm/Passes/DroppedVariableStats.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ class DroppedVariableStats {
9696
DenseSet<VarID> &DebugVariablesBeforeSet =
9797
DbgVariables.DebugVariablesBefore;
9898
DenseSet<VarID> &DebugVariablesAfterSet = DbgVariables.DebugVariablesAfter;
99-
if (InlinedAts.back().find(FuncName) == InlinedAts.back().end())
99+
auto It = InlinedAts.back().find(FuncName);
100+
if (It == InlinedAts.back().end())
100101
return;
101-
DenseMap<VarID, DILocation *> &InlinedAtsMap = InlinedAts.back()[FuncName];
102+
DenseMap<VarID, DILocation *> &InlinedAtsMap = It->second;
102103
// Find an Instruction that shares the same scope as the dropped #dbg_value
103104
// or has a scope that is the child of the scope of the #dbg_value, and has
104105
// an inlinedAt equal to the inlinedAt of the #dbg_value or it's inlinedAt

0 commit comments

Comments
 (0)