Skip to content

Commit fbefe02

Browse files
committed
merge main into amd-staging
2 parents dca057f + 3a695e1 commit fbefe02

File tree

390 files changed

+8095
-2820
lines changed

Some content is hidden

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

390 files changed

+8095
-2820
lines changed

.github/workflows/gha-codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- main
10+
paths:
11+
- '.github/**'
1012
schedule:
1113
- cron: '30 0 * * *'
1214

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ jobs:
113113
./configure
114114
sudo make install
115115
- name: Download source code
116-
uses: llvm/actions/get-llvm-project-src@main
116+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117117
with:
118118
ref: ${{ matrix.ref }}
119-
repo: ${{ matrix.repo }}
119+
repository: ${{ matrix.repo }}
120120
- name: Configure
121121
run: |
122122
mkdir install

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333
3434
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
3535
steps:
36-
- uses: actions/setup-python@v6
36+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
3737
with:
3838
python-version: '3.10'
3939

4040
- name: Extract information from the PR
4141
id: vars
42+
env:
43+
COMMENT_BODY: ${{ github.event.comment.body }}
4244
run: |
4345
python3 -m venv .venv
4446
source .venv/bin/activate
@@ -51,7 +53,7 @@ jobs:
5153
print(f"pr_base={pr.base.sha}")
5254
print(f"pr_head={pr.head.sha}")
5355
EOF
54-
BENCHMARKS=$(echo "${{ github.event.comment.body }}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
56+
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
5557
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
5658
5759
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/llvm-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ jobs:
101101
./configure
102102
sudo make install
103103
- name: Download source code
104-
uses: llvm/actions/get-llvm-project-src@main
104+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
105105
with:
106106
ref: ${{ matrix.ref }}
107-
repo: ${{ matrix.repo }}
107+
repository: ${{ matrix.repo }}
108108
- name: Configure
109109
run: |
110110
mkdir install

bolt/lib/Core/BinaryContext.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "llvm/MC/MCSymbol.h"
3434
#include "llvm/Support/CommandLine.h"
3535
#include "llvm/Support/Error.h"
36+
#include "llvm/Support/FileSystem.h"
3637
#include "llvm/Support/Regex.h"
3738
#include <algorithm>
3839
#include <functional>
@@ -1632,19 +1633,29 @@ void BinaryContext::preprocessDWODebugInfo() {
16321633
DwarfUnit->getUnitDIE().find(
16331634
{dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
16341635
"");
1635-
SmallString<16> AbsolutePath;
1636+
SmallString<16> AbsolutePath(DWOName);
1637+
std::string DWOCompDir = DwarfUnit->getCompilationDir();
16361638
if (!opts::CompDirOverride.empty()) {
1637-
sys::path::append(AbsolutePath, opts::CompDirOverride);
1638-
sys::path::append(AbsolutePath, DWOName);
1639+
DWOCompDir = opts::CompDirOverride;
1640+
} else if (!sys::fs::exists(DWOCompDir) && sys::fs::exists(DWOName)) {
1641+
DWOCompDir = ".";
1642+
this->outs()
1643+
<< "BOLT-WARNING: Debug Fission: Debug Compilation Directory of "
1644+
<< DWOName
1645+
<< " does not exist. Relative path will be used to process .dwo "
1646+
"files.\n";
16391647
}
1648+
// Prevent failures when DWOName is already an absolute path.
1649+
sys::fs::make_absolute(DWOCompDir, AbsolutePath);
16401650
DWARFUnit *DWOCU =
16411651
DwarfUnit->getNonSkeletonUnitDIE(false, AbsolutePath).getDwarfUnit();
16421652
if (!DWOCU->isDWOUnit()) {
16431653
this->outs()
16441654
<< "BOLT-WARNING: Debug Fission: DWO debug information for "
16451655
<< DWOName
16461656
<< " was not retrieved and won't be updated. Please check "
1647-
"relative path.\n";
1657+
"relative path or use '--comp-dir-override' to specify the base "
1658+
"location.\n";
16481659
continue;
16491660
}
16501661
DWOCUs[*DWOId] = DWOCU;

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,15 +1846,16 @@ void DWARFRewriter::writeDWOFiles(
18461846
}
18471847

18481848
std::string CompDir = CU.getCompilationDir();
1849+
SmallString<16> AbsolutePath(DWOName);
18491850

18501851
if (!opts::DwarfOutputPath.empty())
18511852
CompDir = opts::DwarfOutputPath.c_str();
18521853
else if (!opts::CompDirOverride.empty())
18531854
CompDir = opts::CompDirOverride;
1854-
1855-
SmallString<16> AbsolutePath;
1856-
sys::path::append(AbsolutePath, CompDir);
1857-
sys::path::append(AbsolutePath, DWOName);
1855+
else if (!sys::fs::exists(CompDir))
1856+
CompDir = ".";
1857+
// Prevent failures when DWOName is already an absolute path.
1858+
sys::fs::make_absolute(CompDir, AbsolutePath);
18581859

18591860
std::error_code EC;
18601861
std::unique_ptr<ToolOutputFile> TempOut =

bolt/test/dwo-name-retrieving.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Test DWO retrieval via relative path with a missing CompDir.
2+
## Also, verify no crash for an absolute DWOName path.
3+
4+
## The case where DWOName is a relative path, and debug compilation directory does not exist.
5+
# RUN: rm -rf %t && mkdir -p %t && cd %t
6+
# RUN: %clang %cflags -g -gsplit-dwarf -fdebug-compilation-dir=/path/does/not/exist %p/Inputs/hello.c -o main.exe
7+
# RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections 2>&1 | FileCheck %s -check-prefix=DWO-NAME-REL
8+
9+
# DWO-NAME-REL: BOLT-WARNING: Debug Fission: Debug Compilation Directory of main.exe-hello.dwo does not exist.
10+
# DWO-NAME-REL-NOT: Debug Fission: DWO debug information for
11+
12+
## The case where DWOName is a absolute path, and a dwp file is provided.
13+
# RUN: %clang %cflags -g -gsplit-dwarf %p/Inputs/hello.c -o %t/main.exe
14+
# RUN: llvm-dwp -e %t/main.exe -o %t/main.exe.dwp
15+
# RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections -dwp=%t/main.exe.dwp 2>&1 | FileCheck %s -check-prefix=DWO-NAME-ABS
16+
17+
# DWO-NAME-ABS-NOT: BOLT-WARNING: Debug Fission: Debug Compilation Directory of {{.*}}/main.exe-hello.dwo does not exist.
18+
# DWO-NAME-ABS-NOT: Debug Fission: DWO debug information for
19+
# DWO-NAME-ABS-NOT: Assertion `FD >= 0 && "File not yet open!"' failed.

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-easily-swappable-parameters %t \
1+
// RUN: %check_clang_tidy %s --extra-arg=-Wno-error=incompatible-pointer-types bugprone-easily-swappable-parameters %t \
22
// RUN: -config='{CheckOptions: { \
33
// RUN: bugprone-easily-swappable-parameters.MinimumLength: 2, \
44
// RUN: bugprone-easily-swappable-parameters.IgnoredParameterNames: "", \

clang/docs/APINotes.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,20 @@ declaration kind), all of which are optional:
229229
- Name: vector
230230
SwiftConformsTo: Cxx.CxxSequence
231231

232+
:SwiftSafety:
233+
234+
Import a declaration as ``@safe`` or ``@unsafe`` to Swift.
235+
236+
::
237+
238+
Tags:
239+
- Name: UnsafeType
240+
SwiftSafety: unsafe
241+
- Name: span
242+
Methods:
243+
- Name: size
244+
SwiftSafety: safe
245+
232246
:Availability, AvailabilityMsg:
233247

234248
A value of "nonswift" is equivalent to ``NS_SWIFT_UNAVAILABLE``. A value of

clang/docs/OpenMPSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ implementation.
576576
| | | | Flang parser: https://github.com/llvm/llvm-project/pull/153807 |
577577
| | | | Flang sema: https://github.com/llvm/llvm-project/pull/154779 |
578578
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
579-
| variable-category on default clause | :part:`In Progress` | :none:`unclaimed` | |
579+
| variable-category on default clause | :good:`done` | :none:`unclaimed` | |
580580
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
581581
| Changes to omp_target_is_accessible | :part:`In Progress` | :part:`In Progress` | |
582582
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

0 commit comments

Comments
 (0)