Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/swift/ABI/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,12 @@ static_assert(sizeof(AsyncTask) == NumWords_AsyncTask * sizeof(void*),
"AsyncTask size is wrong");
static_assert(alignof(AsyncTask) == 2 * alignof(void*),
"AsyncTask alignment is wrong");
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
// Libc hardcodes this offset to extract the TaskID
static_assert(offsetof(AsyncTask, Id) == 4 * sizeof(void *) + 4,
"AsyncTask::Id offset is wrong");
#pragma clang diagnostic pop

SWIFT_CC(swiftasync)
inline void Job::runInFullyEstablishedContext() {
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Remote/MetadataReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ class MetadataReader {
return 0;
};

switch (auto kind = flags.getKind()) {
switch (flags.getKind()) {
case ContextDescriptorKind::Module:
baseSize = sizeof(TargetModuleContextDescriptor<Runtime>);
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/Demangling/Demangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ NodePointer Demangler::demangleThunkOrSpecialization() {
switch (char c = nextChar()) {
// Thunks that are from a thunk inst. We take the TT namespace.
case 'T': {
switch (char c = nextChar()) {
switch (nextChar()) {
case 'I':
return createWithChild(Node::Kind::SILThunkIdentity, popNode(isEntity));
case 'H':
Expand Down
3 changes: 3 additions & 0 deletions stdlib/public/Concurrency/TaskPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,11 @@ struct AsyncTask::PrivateStorage {

// It will be aligned to 2 words on all platforms. On arm64_32, we have an
// additional requirement where it is aligned to 4 words.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
static_assert(((offsetof(AsyncTask, Private) + offsetof(AsyncTask::PrivateStorage, StatusStorage)) % ACTIVE_TASK_STATUS_SIZE == 0),
"StatusStorage is not aligned in the AsyncTask");
#pragma clang diagnostic pop
static_assert(sizeof(AsyncTask::PrivateStorage) <= sizeof(AsyncTask::OpaquePrivateStorage),
"Task-private storage doesn't fit in reserved space");

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/runtime/LibPrespecialized.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ void _swift_validatePrespecializedMetadata() {

auto result = swift_getTypeByMangledName(MetadataState::Complete,
mangledName, nullptr, {}, {});
if (auto *error = result.getError()) {
if (result.getError()) {
fprintf(stderr,
"Prespecializations library validation: unable to build metadata "
"for mangled name '%s'\n",
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/runtime/MetadataLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ ResolveAsSymbolicReference::operator()(SymbolicReferenceKind kind,
break;

default:
if (auto typeContext = dyn_cast<TypeContextDescriptor>(descriptor)) {
if (isa<TypeContextDescriptor>(descriptor)) {
nodeKind = Node::Kind::TypeSymbolicReference;
isType = true;
break;
Expand Down
3 changes: 3 additions & 0 deletions stdlib/toolchain/Compatibility56/include/Concurrency/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,12 @@ static_assert(sizeof(AsyncTask) == NumWords_AsyncTask * sizeof(void*),
"AsyncTask size is wrong");
static_assert(alignof(AsyncTask) == 2 * alignof(void*),
"AsyncTask alignment is wrong");
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
// Libc hardcodes this offset to extract the TaskID
static_assert(offsetof(AsyncTask, Id) == 4 * sizeof(void *) + 4,
"AsyncTask::Id offset is wrong");
#pragma clang diagnostic pop

SWIFT_CC(swiftasync)
inline void Job::runInFullyEstablishedContext() {
Expand Down