Skip to content

Commit d15f09c

Browse files
authored
Merge pull request #7867 from hughbe/metadata
2 parents 817adc2 + 8d40749 commit d15f09c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

include/swift/Runtime/Metadata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ struct TargetValueMetadata : public TargetMetadata<Runtime> {
19931993
return nullptr;
19941994

19951995
auto asWords = reinterpret_cast<
1996-
ConstTargetMetadataPointer<Runtime, TargetMetadata> const *>(this);
1996+
ConstTargetMetadataPointer<Runtime, swift::TargetMetadata> const *>(this);
19971997
return (asWords + Description->GenericParams.Offset);
19981998
}
19991999

stdlib/public/runtime/MetadataImpl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ struct NonFixedBufferValueWitnesses : BufferValueWitnessesBase<Impl> {
881881

882882
static OpaqueValue *projectBuffer(ValueBuffer *buffer, const Metadata *self) {
883883
auto vwtable = self->getValueWitnesses();
884+
(void)vwtable;
884885
if (!IsKnownAllocated && vwtable->isValueInline()) {
885886
return reinterpret_cast<OpaqueValue*>(buffer);
886887
} else {
@@ -900,6 +901,7 @@ struct NonFixedBufferValueWitnesses : BufferValueWitnessesBase<Impl> {
900901
ValueBuffer *src,
901902
const Metadata *self) {
902903
auto vwtable = self->getValueWitnesses();
904+
(void)vwtable;
903905
if (!IsKnownAllocated && !vwtable->isValueInline()) {
904906
return Impl::initializeWithTake(reinterpret_cast<OpaqueValue*>(dest),
905907
reinterpret_cast<OpaqueValue*>(src),

stdlib/public/runtime/Reflection.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ AnyReturn swift_MagicMirrorData_objcValue(HeapObject *owner,
233233
case MetadataKind::ErrorObject:
234234
return "(ErrorType Object)";
235235
}
236+
237+
swift_runtime_unreachable("Unhandled MetadataKind in switch.");
236238
}
237239

238240
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE

0 commit comments

Comments
 (0)