Skip to content

Commit 34a968c

Browse files
committed
Update some comments that are related to formal access.
1 parent 8a8c86a commit 34a968c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

lib/SILGen/FormalEvaluation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ class FormalAccess {
7171
virtual void finishImpl(SILGenFunction &SGF) = 0;
7272
};
7373

74+
// FIXME: Misnomer. This is not used for borrowing a formal memory location
75+
// (ExclusiveBorrowFormalAccess is always used for that). This is only used for
76+
// formal access from a +0 value, which requires producing a "borrowed"
77+
// SILValue.
7478
class SharedBorrowFormalAccess : public FormalAccess {
7579
SILValue originalValue;
7680
SILValue borrowedValue;

lib/SILGen/Initialization.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ class KnownAddressInitialization : public SingleBufferInitialization {
235235
void finishUninitialized(SILGenFunction &SGF) override {}
236236
};
237237

238-
/// Abstract base class for single-buffer initializations.
239238
class TemporaryInitialization : public SingleBufferInitialization {
240239
SILValue Addr;
241240
CleanupHandle Cleanup;

lib/SILGen/LValue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ class InOutConversionScope {
500500
~InOutConversionScope();
501501
};
502502

503+
// FIXME: Misnomer. This class is used for both shared (read) and exclusive
504+
// (modify) formal borrows.
503505
struct LLVM_LIBRARY_VISIBILITY ExclusiveBorrowFormalAccess : FormalAccess {
504506
std::unique_ptr<LogicalPathComponent> component;
505507
ManagedValue base;

0 commit comments

Comments
 (0)