Skip to content

Commit e6d9105

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr/riscv-objdump-basic-mapping
2 parents 9762d9d + 0206c0f commit e6d9105

File tree

1,958 files changed

+82707
-30075
lines changed

Some content is hidden

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

1,958 files changed

+82707
-30075
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,37 @@ jobs:
2121
- os: ubuntu-24.04
2222
build_type: Debug
2323
ccache-variant: sccache
24-
c_compiler: clang-20
25-
cpp_compiler: clang++-20
24+
c_compiler: clang-22
25+
cpp_compiler: clang++-22
2626
target: x86_64-unknown-linux-llvm
2727
include_scudo: ON
2828
- os: ubuntu-24.04
2929
build_type: Release
3030
ccache-variant: sccache
31-
c_compiler: clang-20
32-
cpp_compiler: clang++-20
31+
c_compiler: clang-22
32+
cpp_compiler: clang++-22
3333
target: x86_64-unknown-linux-llvm
3434
include_scudo: ON
3535
- os: ubuntu-24.04
3636
build_type: MinSizeRel
3737
ccache-variant: sccache
38-
c_compiler: clang-20
39-
cpp_compiler: clang++-20
38+
c_compiler: clang-22
39+
cpp_compiler: clang++-22
4040
target: x86_64-unknown-linux-llvm
4141
include_scudo: ON
4242
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
4343
- os: ubuntu-24.04-arm
4444
build_type: Debug
4545
ccache-variant: ccache
46-
c_compiler: clang-20
47-
cpp_compiler: clang++-20
46+
c_compiler: clang-22
47+
cpp_compiler: clang++-22
4848
target: aarch64-unknown-linux-llvm
4949
include_scudo: ON
5050
- os: ubuntu-24.04
5151
build_type: Debug
5252
ccache-variant: ccache
53-
c_compiler: clang-20
54-
cpp_compiler: clang++-20
53+
c_compiler: clang-22
54+
cpp_compiler: clang++-22
5555
target: x86_64-unknown-uefi-llvm
5656
include_scudo: OFF
5757
# TODO: add back gcc build when it is fixed
@@ -81,7 +81,7 @@ jobs:
8181
run: |
8282
wget https://apt.llvm.org/llvm.sh
8383
chmod +x llvm.sh
84-
sudo ./llvm.sh 20
84+
sudo ./llvm.sh 22
8585
sudo apt-get update
8686
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
8787
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm

bolt/lib/Core/Exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ bool CFIReaderWriter::fillCFIInfoFor(BinaryFunction &Function) const {
500500

501501
const FDE &CurFDE = *I->second;
502502
std::optional<uint64_t> LSDA = CurFDE.getLSDAAddress();
503-
Function.setLSDAAddress(LSDA ? *LSDA : 0);
503+
Function.setLSDAAddress(LSDA.value_or(0));
504504

505505
uint64_t Offset = Function.getFirstInstructionOffset();
506506
uint64_t CodeAlignment = CurFDE.getLinkedCIE()->getCodeAlignmentFactor();

bolt/test/binary-analysis/AArch64/cmdline-args.test

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
# Verify that an error message is provided if an input file is missing or incorrect
55

66
RUN: not llvm-bolt-binary-analysis 2>&1 | FileCheck -check-prefix=NOFILEARG %s
7-
NOFILEARG: llvm-bolt-binary-analysis: Not enough positional command line arguments specified!
8-
NOFILEARG-NEXT: Must specify at least 1 positional argument: See: {{.*}}llvm-bolt-binary-analysis --help
7+
NOFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: Not enough positional command line arguments specified!
8+
NOFILEARG-NEXT: Must specify at least 1 positional argument: See: {{.*}}llvm-bolt-binary-analysis{{(\.exe)?}} --help
99

1010
RUN: not llvm-bolt-binary-analysis non-existing-file 2>&1 | FileCheck -check-prefix=NONEXISTINGFILEARG %s
11-
NONEXISTINGFILEARG: llvm-bolt-binary-analysis: 'non-existing-file': No such file or directory.
11+
# Don't check the OS-dependent message "No such file or directory".
12+
NONEXISTINGFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: 'non-existing-file': {{.*}}
1213

1314
RUN: not llvm-bolt-binary-analysis %p/Inputs/dummy.txt 2>&1 | FileCheck -check-prefix=NOELFFILEARG %s
14-
NOELFFILEARG: llvm-bolt-binary-analysis: '{{.*}}/Inputs/dummy.txt': The file was not recognized as a valid object file.
15+
NOELFFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: '{{.*}}/Inputs/dummy.txt': The file was not recognized as a valid object file.
1516

1617
RUN: %clang %cflags -Wl,--emit-relocs %p/../../Inputs/asm_foo.s %p/../../Inputs/asm_main.c -o %t.exe
1718
RUN: llvm-bolt-binary-analysis %t.exe 2>&1 | FileCheck -check-prefix=VALIDELFFILEARG --allow-empty %s
@@ -26,7 +27,7 @@ RUN: llvm-bolt-binary-analysis --help 2>&1 | FileCheck -check-prefix=HELP %s
2627

2728
HELP: OVERVIEW: BinaryAnalysis
2829
HELP-EMPTY:
29-
HELP-NEXT: USAGE: llvm-bolt-binary-analysis [options] <executable>
30+
HELP-NEXT: USAGE: llvm-bolt-binary-analysis{{(\.exe)?}} [options] <executable>
3031
HELP-EMPTY:
3132
HELP-NEXT: OPTIONS:
3233
HELP-EMPTY:

bolt/test/lsda-section-name.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This test check that LSDA section named by .gcc_except_table.main is
22
// disassembled by BOLT.
33

4-
// RUN: %clang++ %cxxflags -O3 -no-pie -c %s -o %t.o
5-
// RUN: %clang++ %cxxflags -O3 -no-pie -fuse-ld=lld %t.o -o %t
4+
// RUN: %clangxx %cxxflags -O3 -no-pie -c %s -o %t.o
5+
// RUN: %clangxx %cxxflags -O3 -no-pie -fuse-ld=lld %t.o -o %t
66
// RUN: llvm-objcopy --rename-section .gcc_except_table=.gcc_except_table.main %t
77
// RUN: llvm-readelf -SW %t | FileCheck %s
88
// RUN: llvm-bolt %t -o %t.bolt

clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ int main(int argc, char **argv) {
9797
cl::ParseCommandLineOptions(argc, argv);
9898

9999
DiagnosticOptions DiagOpts;
100-
DiagnosticsEngine Diagnostics(
101-
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), DiagOpts);
100+
DiagnosticsEngine Diagnostics(DiagnosticIDs::create(), DiagOpts);
102101

103102
// Determine a formatting style from options.
104103
auto FormatStyleOrError = format::getStyle(FormatStyleOpt, FormatStyleConfig,

clang-tools-extra/clang-change-namespace/tool/ClangChangeNamespace.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ int main(int argc, const char **argv) {
128128
LangOptions DefaultLangOptions;
129129
DiagnosticOptions DiagOpts;
130130
clang::TextDiagnosticPrinter DiagnosticPrinter(errs(), DiagOpts);
131-
DiagnosticsEngine Diagnostics(
132-
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), DiagOpts,
133-
&DiagnosticPrinter, false);
131+
DiagnosticsEngine Diagnostics(DiagnosticIDs::create(), DiagOpts,
132+
&DiagnosticPrinter, false);
134133
auto &FileMgr = Tool.getFiles();
135134
SourceManager Sources(Diagnostics, FileMgr);
136135
Rewriter Rewrite(Sources, DefaultLangOptions);

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Action : public clang::ASTFrontendAction {
5353

5454
Compiler->createSema(getTranslationUnitKind(), CompletionConsumer);
5555
SemaSource->setCompilerInstance(Compiler);
56-
Compiler->getSema().addExternalSource(SemaSource.get());
56+
Compiler->getSema().addExternalSource(SemaSource);
5757

5858
clang::ParseAST(Compiler->getSema(), Compiler->getFrontendOpts().ShowStats,
5959
Compiler->getFrontendOpts().SkipFunctionBodies);

clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ int includeFixerMain(int argc, const char **argv) {
454454

455455
// Set up a new source manager for applying the resulting replacements.
456456
DiagnosticOptions DiagOpts;
457-
DiagnosticsEngine Diagnostics(new DiagnosticIDs, DiagOpts);
457+
DiagnosticsEngine Diagnostics(DiagnosticIDs::create(), DiagOpts);
458458
TextDiagnosticPrinter DiagnosticPrinter(outs(), DiagOpts);
459459
SourceManager SM(Diagnostics, tool.getFiles());
460460
Diagnostics.setClient(&DiagnosticPrinter, false);

clang-tools-extra/clang-move/tool/ClangMove.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ int main(int argc, const char **argv) {
178178

179179
DiagnosticOptions DiagOpts;
180180
clang::TextDiagnosticPrinter DiagnosticPrinter(errs(), DiagOpts);
181-
DiagnosticsEngine Diagnostics(
182-
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), DiagOpts,
183-
&DiagnosticPrinter, false);
181+
DiagnosticsEngine Diagnostics(DiagnosticIDs::create(), DiagOpts,
182+
&DiagnosticPrinter, false);
184183
auto &FileMgr = Tool.getFiles();
185184
SourceManager SM(Diagnostics, FileMgr);
186185
Rewriter Rewrite(SM, LangOptions());

clang-tools-extra/clang-reorder-fields/tool/ClangReorderFields.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ int main(int argc, const char **argv) {
7474
LangOptions DefaultLangOptions;
7575
DiagnosticOptions DiagOpts;
7676
TextDiagnosticPrinter DiagnosticPrinter(errs(), DiagOpts);
77-
DiagnosticsEngine Diagnostics(
78-
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), DiagOpts,
79-
&DiagnosticPrinter, false);
77+
DiagnosticsEngine Diagnostics(DiagnosticIDs::create(), DiagOpts,
78+
&DiagnosticPrinter, false);
8079

8180
auto &FileMgr = Tool.getFiles();
8281
SourceManager Sources(Diagnostics, FileMgr);

0 commit comments

Comments
 (0)