Skip to content

Commit 1e7037e

Browse files
Merged main:0964328c2960 into amd-gfx:abbd9422e1e1
Local branch amd-gfx abbd942 Merged main:caf8942cd9e5 into amd-gfx:5f484c18d2a2 Remote branch main 0964328 [lldb] Fix the SocketTest failure on unsupported hosts (llvm#118673) Change-Id: I8af78caad0bfeb0fe14eedd005ce56f62b49e81b
2 parents abbd942 + 0964328 commit 1e7037e

File tree

977 files changed

+32049
-20511
lines changed

Some content is hidden

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

977 files changed

+32049
-20511
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ jobs:
148148
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
149149
TZ=UTC ninja -C libunwind-build docs-libunwind-html
150150
mkdir built-docs/libunwind
151-
cp -r libunwind-build/docs/* built-docs/libunwind
151+
cp -r libunwind-build/libunwind/docs/* built-docs/libunwind
152152
- name: Build libcxx docs
153153
if: steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true'
154154
run: |
155155
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
156156
TZ=UTC ninja -C libcxx-build docs-libcxx-html
157157
mkdir built-docs/libcxx
158-
cp -r libcxx-build/docs/* built-docs/libcxx/
158+
cp -r libcxx-build/libcxx/docs/* built-docs/libcxx/
159159
- name: Build libc docs
160160
if: steps.docs-changed-subprojects.outputs.libc_any_changed == 'true'
161161
run: |

.github/workflows/libcxx-restart-preempted-jobs.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,91 @@ jobs:
130130
run_id: context.payload.workflow_run.id
131131
})
132132
await create_check_run('success', 'Restarted workflow run due to preempted job')
133+
134+
restart-test:
135+
if: github.repository_owner == 'llvm' && (github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled') && github.event.actor.login == 'ldionne' # TESTING ONLY
136+
name: "Restart Job"
137+
permissions:
138+
statuses: read
139+
checks: write
140+
actions: write
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: "Restart Job"
144+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
145+
with:
146+
script: |
147+
const FAILURE_REGEX = /Process completed with exit code 1./
148+
const PREEMPTION_REGEX = /The runner has received a shutdown signal|The operation was canceled/
149+
150+
function log(msg) {
151+
core.notice(msg)
152+
}
153+
154+
const wf_run = context.payload.workflow_run
155+
log(`Running on "${wf_run.display_title}" by @${wf_run.actor.login} (event: ${wf_run.event})\nWorkflow run URL: ${wf_run.html_url}`)
156+
157+
log('Listing check runs for suite')
158+
const check_suites = await github.rest.checks.listForSuite({
159+
owner: context.repo.owner,
160+
repo: context.repo.repo,
161+
check_suite_id: context.payload.workflow_run.check_suite_id,
162+
per_page: 100 // FIXME: We don't have 100 check runs yet, but we should handle this better.
163+
})
164+
165+
preemptions = [];
166+
legitimate_failures = [];
167+
for (check_run of check_suites.data.check_runs) {
168+
log(`Checking check run: ${check_run.id}`);
169+
if (check_run.status != 'completed') {
170+
log('Check run was not completed. Skipping.');
171+
continue;
172+
}
173+
174+
if (check_run.conclusion != 'failure' && check_run.conclusion != 'cancelled') {
175+
log(`Check run had conclusion: ${check_run.conclusion}. Skipping.`);
176+
continue;
177+
}
178+
179+
annotations = await github.rest.checks.listAnnotations({
180+
owner: context.repo.owner,
181+
repo: context.repo.repo,
182+
check_run_id: check_run.id
183+
})
184+
185+
preemption_annotation = annotations.data.find(function(annotation) {
186+
return annotation.annotation_level == 'failure' &&
187+
annotation.message.match(PREEMPTION_REGEX) != null;
188+
});
189+
if (preemption_annotation != null) {
190+
log(`Found preemption message: ${preemption_annotation.message}`);
191+
preemptions.push(check_run);
192+
break;
193+
}
194+
195+
failure_annotation = annotations.data.find(function(annotation) {
196+
return annotation.annotation_level == 'failure' &&
197+
annotation.message.match(FAILURE_REGEX) != null;
198+
});
199+
if (failure_annotation != null) {
200+
log(`Found legitimate failure annotation: ${failure_annotation.message}`);
201+
legitimate_failures.push(check_run);
202+
break;
203+
}
204+
}
205+
206+
if (preemptions) {
207+
log('Found some preempted jobs');
208+
if (legitimate_failures) {
209+
log('Also found some legitimate failures, so not restarting the workflow.');
210+
} else {
211+
log('Did not find any legitimate failures. Restarting workflow.');
212+
await github.rest.actions.reRunWorkflowFailedJobs({
213+
owner: context.repo.owner,
214+
repo: context.repo.repo,
215+
run_id: context.payload.workflow_run.id
216+
})
217+
}
218+
} else {
219+
log('Did not find any preempted jobs. Not restarting the workflow.');
220+
}

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class ClangTidyContext {
8181

8282
~ClangTidyContext();
8383

84+
ClangTidyContext(const ClangTidyContext &) = delete;
85+
ClangTidyContext &operator=(const ClangTidyContext &) = delete;
86+
8487
/// Report any errors detected using this method.
8588
///
8689
/// This is still under heavy development and will likely change towards using

clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class NoLintDirectiveHandler {
3131
public:
3232
NoLintDirectiveHandler();
3333
~NoLintDirectiveHandler();
34+
NoLintDirectiveHandler(const NoLintDirectiveHandler &) = delete;
35+
NoLintDirectiveHandler &operator=(const NoLintDirectiveHandler &) = delete;
3436

3537
bool shouldSuppress(DiagnosticsEngine::Level DiagLevel,
3638
const Diagnostic &Diag, llvm::StringRef DiagName,

clang-tools-extra/clangd/ClangdLSPServer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class ClangdLSPServer : private ClangdServer::Callbacks,
7373
/// The destructor blocks on any outstanding background tasks.
7474
~ClangdLSPServer();
7575

76+
ClangdLSPServer(const ClangdLSPServer &other) = delete;
77+
ClangdLSPServer &operator=(const ClangdLSPServer &other) = delete;
78+
7679
/// Run LSP server loop, communicating with the Transport provided in the
7780
/// constructor. This method must not be executed more than once.
7881
///

clang-tools-extra/clangd/ParsedAST.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class ParsedAST {
5959

6060
~ParsedAST();
6161

62+
ParsedAST(const ParsedAST &Other) = delete;
63+
ParsedAST &operator=(const ParsedAST &Other) = delete;
64+
6265
/// Note that the returned ast will not contain decls from the preamble that
6366
/// were not deserialized during parsing. Clients should expect only decls
6467
/// from the main file to be in the AST.

clang-tools-extra/clangd/TUScheduler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ class PreambleThrottlerRequest {
411411
if (Throttler)
412412
Throttler->release(ID);
413413
}
414+
PreambleThrottlerRequest(const PreambleThrottlerRequest &) = delete;
415+
PreambleThrottlerRequest &
416+
operator=(const PreambleThrottlerRequest &) = delete;
414417

415418
private:
416419
PreambleThrottler::RequestID ID;
@@ -621,7 +624,8 @@ class ASTWorker {
621624
AsyncTaskRunner *Tasks, Semaphore &Barrier,
622625
const TUScheduler::Options &Opts, ParsingCallbacks &Callbacks);
623626
~ASTWorker();
624-
627+
ASTWorker(const ASTWorker &other) = delete;
628+
ASTWorker &operator=(const ASTWorker &other) = delete;
625629
void update(ParseInputs Inputs, WantDiagnostics, bool ContentChanged);
626630
void
627631
runWithAST(llvm::StringRef Name,

clang-tools-extra/clangd/TUScheduler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ class TUScheduler {
242242
std::unique_ptr<ParsingCallbacks> ASTCallbacks = nullptr);
243243
~TUScheduler();
244244

245+
TUScheduler(const TUScheduler &other) = delete;
246+
TUScheduler &operator=(const TUScheduler &other) = delete;
247+
245248
struct FileStats {
246249
std::size_t UsedBytesAST = 0;
247250
std::size_t UsedBytesPreamble = 0;

clang-tools-extra/clangd/XRefs.cpp

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,31 +121,17 @@ void logIfOverflow(const SymbolLocation &Loc) {
121121

122122
// Convert a SymbolLocation to LSP's Location.
123123
// TUPath is used to resolve the path of URI.
124-
// FIXME: figure out a good home for it, and share the implementation with
125-
// FindSymbols.
126124
std::optional<Location> toLSPLocation(const SymbolLocation &Loc,
127125
llvm::StringRef TUPath) {
128126
if (!Loc)
129127
return std::nullopt;
130-
auto Uri = URI::parse(Loc.FileURI);
131-
if (!Uri) {
132-
elog("Could not parse URI {0}: {1}", Loc.FileURI, Uri.takeError());
128+
auto LSPLoc = indexToLSPLocation(Loc, TUPath);
129+
if (!LSPLoc) {
130+
elog("{0}", LSPLoc.takeError());
133131
return std::nullopt;
134132
}
135-
auto U = URIForFile::fromURI(*Uri, TUPath);
136-
if (!U) {
137-
elog("Could not resolve URI {0}: {1}", Loc.FileURI, U.takeError());
138-
return std::nullopt;
139-
}
140-
141-
Location LSPLoc;
142-
LSPLoc.uri = std::move(*U);
143-
LSPLoc.range.start.line = Loc.Start.line();
144-
LSPLoc.range.start.character = Loc.Start.column();
145-
LSPLoc.range.end.line = Loc.End.line();
146-
LSPLoc.range.end.character = Loc.End.column();
147133
logIfOverflow(Loc);
148-
return LSPLoc;
134+
return *LSPLoc;
149135
}
150136

151137
SymbolLocation toIndexLocation(const Location &Loc, std::string &URIStorage) {

clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ namespace {
2424

2525
std::unique_ptr<SymbolIndex> buildMem() {
2626
return loadIndex(IndexFilename, clang::clangd::SymbolOrigin::Static,
27-
/*UseDex=*/false);
27+
/*UseDex=*/false, /*SupportContainedRefs=*/true);
2828
}
2929

3030
std::unique_ptr<SymbolIndex> buildDex() {
3131
return loadIndex(IndexFilename, clang::clangd::SymbolOrigin::Static,
32-
/*UseDex=*/true);
32+
/*UseDex=*/true, /*SupportContainedRefs=*/true);
3333
}
3434

3535
// Reads JSON array of serialized FuzzyFindRequest's from user-provided file.

clang-tools-extra/clangd/index/MemIndex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class MemIndex : public SymbolIndex {
9797
// Set of files which were used during this index build.
9898
llvm::StringSet<> Files;
9999
// Contents of the index (symbols, references, etc.)
100-
IndexContents IdxContents;
100+
IndexContents IdxContents = IndexContents::None;
101101
std::shared_ptr<void> KeepAlive; // poor man's move-only std::any
102102
// Size of memory retained by KeepAlive.
103103
size_t BackingDataSize = 0;

clang-tools-extra/clangd/index/dex/Dex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class Dex : public SymbolIndex {
146146
// Set of files which were used during this index build.
147147
llvm::StringSet<> Files;
148148
// Contents of the index (symbols, references, etc.)
149-
IndexContents IdxContents;
149+
IndexContents IdxContents = IndexContents::None;
150150
// Size of memory retained by KeepAlive.
151151
size_t BackingDataSize = 0;
152152
};

clang-tools-extra/clangd/index/remote/Index.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ message Relation {
133133
}
134134

135135
message ContainedRefsRequest {
136-
required string id = 1;
136+
optional string id = 1;
137137
optional uint32 limit = 2;
138138
}
139139

@@ -145,7 +145,7 @@ message ContainedRefsReply {
145145
}
146146

147147
message ContainedRef {
148-
required SymbolLocation location = 1;
149-
required uint32 kind = 2;
150-
required string symbol = 3;
148+
optional SymbolLocation location = 1;
149+
optional uint32 kind = 2;
150+
optional string symbol = 3;
151151
}

clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Marshaller::fromProtobuf(const RefsRequest *Message) {
129129
llvm::Expected<clangd::ContainedRefsRequest>
130130
Marshaller::fromProtobuf(const ContainedRefsRequest *Message) {
131131
clangd::ContainedRefsRequest Req;
132+
if (!Message->has_id())
133+
return error("ContainedRefsRequest requires an id.");
132134
auto ID = SymbolID::fromStr(Message->id());
133135
if (!ID)
134136
return ID.takeError();
@@ -207,6 +209,12 @@ llvm::Expected<clangd::Ref> Marshaller::fromProtobuf(const Ref &Message) {
207209
llvm::Expected<clangd::ContainedRefsResult>
208210
Marshaller::fromProtobuf(const ContainedRef &Message) {
209211
clangd::ContainedRefsResult Result;
212+
if (!Message.has_location())
213+
return error("ContainedRef must have a location.");
214+
if (!Message.has_kind())
215+
return error("ContainedRef must have a kind.");
216+
if (!Message.has_symbol())
217+
return error("ContainedRef must have a symbol.");
210218
auto Location = fromProtobuf(Message.location());
211219
if (!Location)
212220
return Location.takeError();

clang-tools-extra/clangd/support/DirectiveTree.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ class Preprocessor {
328328
Preprocessor(const TokenStream &In, TokenStream &Out) : In(In), Out(Out) {}
329329
~Preprocessor() { Out.finalize(); }
330330

331+
Preprocessor(const Preprocessor &other) = delete;
332+
Preprocessor &operator=(const Preprocessor &other) = delete;
333+
331334
void walk(const DirectiveTree &T) {
332335
for (const auto &C : T.Chunks)
333336
std::visit(*this, C);

clang-tools-extra/modularize/ModuleAssistant.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class Module {
4646
public:
4747
Module(llvm::StringRef Name, bool Problem);
4848
~Module();
49+
Module(const Module &other) = delete;
50+
Module &operator=(const Module &other) = delete;
4951
bool output(llvm::raw_fd_ostream &OS, int Indent);
5052
Module *findSubModule(llvm::StringRef SubName);
5153

clang/cmake/caches/CrossWinToARMLinux.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ endif()
9696
if (NOT DEFINED TOOLCHAIN_SHARED_LIBS)
9797
set(TOOLCHAIN_SHARED_LIBS OFF)
9898
endif()
99-
99+
# Enable usage of the static libunwind and libc++abi libraries.
100+
if (NOT DEFINED TOOLCHAIN_USE_STATIC_LIBS)
101+
set(TOOLCHAIN_USE_STATIC_LIBS ON)
102+
endif()
103+
100104
if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
101105
if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(armv|arm32)+")
102106
set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
@@ -206,7 +210,7 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_USE_COMPILER_RT
206210
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
207211

208212
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
209-
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
213+
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER ${TOOLCHAIN_USE_STATIC_LIBS} CACHE BOOL "")
210214
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
211215
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
212216
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
@@ -217,7 +221,7 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ABI_VERSION
217221
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "") #!!!
218222
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
219223
# Merge libc++ and libc++abi libraries into the single libc++ library file.
220-
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
224+
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ${TOOLCHAIN_USE_STATIC_LIBS} CACHE BOOL "")
221225
# Forcely disable the libc++ benchmarks on Windows build hosts
222226
# (current benchmark test configuration does not support the cross builds there).
223227
if (WIN32)

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
66

77
set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
88

9-
set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
9+
set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
1010
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
1111

1212
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
@@ -25,8 +25,6 @@ set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
2525
set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
2626
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
2727
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
28-
set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
29-
set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
3028
set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
3129
set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
3230
set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")

clang/cmake/caches/Fuchsia.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
66

77
set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
88

9-
set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
9+
set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
1010

1111
set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "")
1212
set(LLVM_ENABLE_LIBEDIT OFF CACHE BOOL "")
@@ -17,7 +17,6 @@ set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
1717
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
1818
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
1919
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
20-
set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
2120
set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
2221
set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
2322
set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")

0 commit comments

Comments
 (0)