mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Redesign the BuiltinFunctionRefInst to contain an Identifier instead of
a FuncDecl. This makes it much more straight-forward for SIL passes to introduce a new one - without doing name lookup in the builtin module! Swift SVN r10694
This commit is contained in:
@@ -634,8 +634,7 @@ bool SILDeserializer::readSILInstruction(SILFunction *Fn, SILBasicBlock *BB,
|
||||
case ValueKind::BuiltinFunctionRefInst: {
|
||||
// Format: FuncDecl and type. Use SILOneOperandLayout.
|
||||
auto Ty = MF->getType(TyID);
|
||||
ResultVal = Builder.createBuiltinFunctionRef(Loc,
|
||||
cast<FuncDecl>(MF->getDecl(ValID)),
|
||||
ResultVal = Builder.createBuiltinFunctionRef(Loc, MF->getIdentifier(ValID),
|
||||
getSILType(Ty, (SILValueCategory)TyCategory));
|
||||
break;
|
||||
}
|
||||
@@ -666,7 +665,7 @@ bool SILDeserializer::readSILInstruction(SILFunction *Fn, SILBasicBlock *BB,
|
||||
}
|
||||
case ValueKind::FunctionRefInst: {
|
||||
auto Ty = MF->getType(TyID);
|
||||
Identifier FuncName = MF->getIdentifier(ValID);
|
||||
Identifier FuncName = MF->getIdentifier(ValID);
|
||||
ResultVal = Builder.createFunctionRef(Loc,
|
||||
getFuncForReference(FuncName,
|
||||
getSILType(Ty, (SILValueCategory)TyCategory),
|
||||
|
||||
Reference in New Issue
Block a user