mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add begin_access and end_access instructions.
NFC because we're not actually emitting them.
This commit is contained in:
@@ -678,6 +678,26 @@ EndBorrowArgumentInst::EndBorrowArgumentInst(SILDebugLocation DebugLoc,
|
||||
SILArgument *Arg)
|
||||
: UnaryInstructionBase(DebugLoc, SILValue(Arg)) {}
|
||||
|
||||
StringRef swift::getSILAccessKindName(SILAccessKind kind) {
|
||||
switch (kind) {
|
||||
case SILAccessKind::Init: return "init";
|
||||
case SILAccessKind::Read: return "read";
|
||||
case SILAccessKind::Modify: return "modify";
|
||||
case SILAccessKind::Deinit: return "deinit";
|
||||
}
|
||||
llvm_unreachable("bad access kind");
|
||||
}
|
||||
|
||||
StringRef swift::getSILAccessEnforcementName(SILAccessEnforcement enforcement) {
|
||||
switch (enforcement) {
|
||||
case SILAccessEnforcement::Unknown: return "unknown";
|
||||
case SILAccessEnforcement::Static: return "static";
|
||||
case SILAccessEnforcement::Dynamic: return "dynamic";
|
||||
case SILAccessEnforcement::Unsafe: return "unsafe";
|
||||
}
|
||||
llvm_unreachable("bad access enforcement");
|
||||
}
|
||||
|
||||
AssignInst::AssignInst(SILDebugLocation Loc, SILValue Src, SILValue Dest)
|
||||
: SILInstruction(ValueKind::AssignInst, Loc), Operands(this, Src, Dest) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user