Distinguish different kinds of l-value reads in SILGen.

This is NFC for now, but I plan to build on this to (1) immediately
remove some unnecessary materialization and loads of the base value
and (2) to allow clients to load a borrowed value.
This commit is contained in:
John McCall
2018-08-30 19:39:45 -04:00
parent 41e4c454a1
commit 6d4c724101
12 changed files with 533 additions and 378 deletions

View File

@@ -100,7 +100,7 @@ static void emitStoreToForeignErrorSlot(SILGenFunction &SGF,
SGF.emitPropertyLValue(loc, ManagedValue::forUnmanaged(foreignErrorSlot),
bridgedErrorPtrType, pointeeProperty,
LValueOptions(),
AccessKind::Write,
SGFAccessKind::Write,
AccessSemantics::Ordinary);
RValue rvalue(SGF, loc, bridgedErrorProto,
SGF.emitManagedRValueWithCleanup(bridgedError));