Skip to content

Commit 0fb3b87

Browse files
committed
Merge branch 'upstream' into x86-half-zext
2 parents 0dd93c7 + 7aed53e commit 0fb3b87

File tree

1,420 files changed

+59804
-17518
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,420 files changed

+59804
-17518
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
build_type: [Debug, Release, MinSizeRel]
1819
include:
1920
- os: ubuntu-24.04
2021
ccache-variant: sccache
@@ -68,7 +69,7 @@ jobs:
6869
cmake -B ${{ steps.strings.outputs.build-output-dir }}
6970
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7071
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
71-
-DCMAKE_BUILD_TYPE=MinSizeRel
72+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
7273
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7374
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7475
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
1717
fail-fast: false
1818
matrix:
19+
build_type: [Debug, Release, MinSizeRel]
1920
include:
2021
# TODO: add linux gcc when it is fixed
2122
- os: ubuntu-24.04
@@ -95,7 +96,7 @@ jobs:
9596
cmake -B ${{ steps.strings.outputs.build-output-dir }}
9697
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
9798
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
98-
-DCMAKE_BUILD_TYPE=MinSizeRel
99+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
99100
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
100101
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
101102
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW

.github/workflows/premerge.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ on:
2121
- 'main'
2222
- 'release/**'
2323

24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
26+
cancel-in-progress: true
27+
2428
jobs:
2529
premerge-checks-linux:
2630
if: >-
2731
github.repository_owner == 'llvm' &&
2832
(github.event_name != 'pull_request' || github.event.action != 'closed')
2933
runs-on: llvm-premerge-linux-runners
30-
concurrency:
31-
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
32-
cancel-in-progress: true
3334
steps:
3435
- name: Checkout LLVM
3536
uses: actions/checkout@v4
@@ -88,9 +89,6 @@ jobs:
8889
github.repository_owner == 'llvm' &&
8990
(github.event_name != 'pull_request' || github.event.action != 'closed')
9091
runs-on: llvm-premerge-windows-runners
91-
concurrency:
92-
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
93-
cancel-in-progress: true
9492
defaults:
9593
run:
9694
shell: bash
@@ -148,9 +146,6 @@ jobs:
148146
149147
permerge-check-macos:
150148
runs-on: macos-14
151-
concurrency:
152-
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
153-
cancel-in-progress: true
154149
if: >-
155150
github.repository_owner == 'llvm' &&
156151
(startswith(github.ref_name, 'release/') ||

bolt/lib/Core/BinaryContext.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,11 @@ void BinaryContext::preprocessDebugInfo() {
17591759
dwarf::toString(CU->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
17601760
if (std::optional<uint64_t> DWOID = CU->getDWOId()) {
17611761
auto Iter = DWOCUs.find(*DWOID);
1762-
assert(Iter != DWOCUs.end() && "DWO CU was not found.");
1762+
if (Iter == DWOCUs.end()) {
1763+
this->errs() << "BOLT-ERROR: DWO CU was not found for " << Name
1764+
<< '\n';
1765+
exit(1);
1766+
}
17631767
Name = dwarf::toString(
17641768
Iter->second->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
17651769
}

bolt/lib/RuntimeLibs/RuntimeLibrary.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "llvm/Object/Archive.h"
1919
#include "llvm/Object/ObjectFile.h"
2020
#include "llvm/Support/Path.h"
21+
#include "llvm/Support/Program.h"
2122

2223
#define DEBUG_TYPE "bolt-rtlib"
2324

@@ -38,6 +39,23 @@ std::string RuntimeLibrary::getLibPathByToolPath(StringRef ToolPath,
3839
llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX);
3940
}
4041
llvm::sys::path::append(LibPath, LibFileName);
42+
if (!llvm::sys::fs::exists(LibPath)) {
43+
// If it is a symlink, check the directory that the symlink points to.
44+
if (llvm::sys::fs::is_symlink_file(ToolPath)) {
45+
SmallString<256> RealPath;
46+
llvm::sys::fs::real_path(ToolPath, RealPath);
47+
if (llvm::ErrorOr<std::string> P =
48+
llvm::sys::findProgramByName(RealPath)) {
49+
outs() << "BOLT-INFO: library not found: " << LibPath << "\n"
50+
<< "BOLT-INFO: " << ToolPath << " is a symlink; will look up "
51+
<< LibFileName
52+
<< " at the target directory that the symlink points to\n";
53+
return getLibPath(*P, LibFileName);
54+
}
55+
}
56+
errs() << "BOLT-ERROR: library not found: " << LibPath << "\n";
57+
exit(1);
58+
}
4159
return std::string(LibPath);
4260
}
4361

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,18 +494,31 @@ genReferencesBlock(const std::vector<Reference> &References,
494494
static std::unique_ptr<TagNode>
495495
writeFileDefinition(const Location &L,
496496
std::optional<StringRef> RepositoryUrl = std::nullopt) {
497-
if (!L.IsFileInRootDir || !RepositoryUrl)
497+
if (!L.IsFileInRootDir && !RepositoryUrl)
498498
return std::make_unique<TagNode>(
499499
HTMLTag::TAG_P, "Defined at line " + std::to_string(L.LineNumber) +
500500
" of file " + L.Filename);
501501
SmallString<128> FileURL(*RepositoryUrl);
502-
llvm::sys::path::append(FileURL, llvm::sys::path::Style::posix, L.Filename);
502+
llvm::sys::path::append(
503+
FileURL, llvm::sys::path::Style::posix,
504+
// If we're on Windows, the file name will be in the wrong format, and
505+
// append won't convert the full path being appended to the correct
506+
// format, so we need to do that here.
507+
llvm::sys::path::convert_to_slash(
508+
L.Filename,
509+
// The style here is the current style of the path, not the one we're
510+
// targeting. If the string is already in the posix style, it will do
511+
// nothing.
512+
llvm::sys::path::Style::windows));
503513
auto Node = std::make_unique<TagNode>(HTMLTag::TAG_P);
504514
Node->Children.emplace_back(std::make_unique<TextNode>("Defined at line "));
505515
auto LocNumberNode =
506516
std::make_unique<TagNode>(HTMLTag::TAG_A, std::to_string(L.LineNumber));
507517
// The links to a specific line in the source code use the github /
508518
// googlesource notation so it won't work for all hosting pages.
519+
// FIXME: we probably should have a configuration setting for line number
520+
// rendering in the HTML. For example, GitHub uses #L22, while googlesource
521+
// uses #22 for line numbers.
509522
LocNumberNode->Attributes.emplace_back(
510523
"href", (FileURL + "#" + std::to_string(L.LineNumber)).str());
511524
Node->Children.emplace_back(std::move(LocNumberNode));

clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ double Circle::area() const {
88

99
double Circle::perimeter() const {
1010
return 3.141 * radius_;
11-
}
11+
}
12+

0 commit comments

Comments
 (0)