[sil-opaque-values] fix an assert in LowerAggregates.

This commit is contained in:
Andrew Trick
2017-09-12 16:06:22 -07:00
parent 658bdad4f5
commit a7bd3136b6

View File

@@ -173,7 +173,8 @@ static bool expandReleaseValue(ReleaseValueInst *DV) {
// If we have an address only type, do nothing.
SILType Type = Value->getType();
assert(Type.isLoadable(Module) &&
assert(!SILModuleConventions(Module).useLoweredAddresses()
|| Type.isLoadable(Module) &&
"release_value should never be called on a non-loadable type.");
if (!shouldExpand(Module, Type.getObjectType()))