SIL: Add builtin_zero instruction.

To represent the zero value of builtin types.

Swift SVN r4907
This commit is contained in:
Joe Groff
2013-04-25 19:50:56 +00:00
parent 618d35a00f
commit d0e0911ecf
7 changed files with 43 additions and 2 deletions

View File

@@ -335,6 +335,12 @@ public:
"Tuple element arguments do not match tuple type!");
}
}
void checkBuiltinZeroInst(BuiltinZeroInst *ZI) {
require(ZI->getType().is<BuiltinType>(),
"builtin_zero result must be a builtin type");
}
void checkMetatypeInst(MetatypeInst *MI) {
require(MI->getType(0).is<MetaTypeType>(),
"metatype instruction must be of metatype type");