mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL Parser: parse initialize_var.
Swift SVN r6294
This commit is contained in:
@@ -757,6 +757,7 @@ bool SILParser::parseSILOpcode(ValueKind &Opcode, SourceLoc &OpcodeLoc,
|
||||
.Case("downcast_archetype_addr", ValueKind::DowncastArchetypeAddrInst)
|
||||
.Case("downcast_archetype_ref", ValueKind::DowncastArchetypeRefInst)
|
||||
.Case("downcast_existential_ref", ValueKind::DowncastExistentialRefInst)
|
||||
.Case("initialize_var", ValueKind::InitializeVarInst)
|
||||
.Case("integer_literal", ValueKind::IntegerLiteralInst)
|
||||
.Case("function_ref", ValueKind::FunctionRefInst)
|
||||
.Case("load", ValueKind::LoadInst)
|
||||
@@ -1270,6 +1271,14 @@ bool SILParser::parseSILInstruction(SILBasicBlock *BB) {
|
||||
IsTake);
|
||||
break;
|
||||
}
|
||||
case ValueKind::InitializeVarInst: {
|
||||
bool NoDefault = false;
|
||||
if (parseSILOptional(NoDefault, P, "no_default_construct") ||
|
||||
parseTypedValueRef(Val))
|
||||
return true;
|
||||
ResultVal = B.createInitializeVar(SILLocation(), Val, !NoDefault);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setLocalValue(ResultVal, ResultName, ResultNameLoc);
|
||||
|
||||
Reference in New Issue
Block a user