Change the integer-literal type from Int2048 to IntLiteral.

Part of SR-290.
This commit is contained in:
John McCall
2018-10-31 22:07:40 -04:00
parent 98b65f2f99
commit abdba1d3f4
55 changed files with 251 additions and 366 deletions

View File

@@ -772,11 +772,10 @@ constantFoldAndCheckIntegerConversions(BuiltinInst *BI,
}
}
// Assume that we are converting from a literal if the Source size is
// 2048. Is there a better way to identify conversions from literals?
bool Literal = (SrcBitWidth == 2048 ||
isa<BuiltinIntegerLiteralType>(SrcTy));
// Assume that we're converting from a literal if the source type is
// IntegerLiteral. Is there a better way to identify this if we start
// using Builtin.IntegerLiteral in an exposed type?
bool Literal = isa<BuiltinIntegerLiteralType>(SrcTy);
// FIXME: This will prevent hard error in cases the error is coming
// from ObjC interoperability code. Currently, we treat NSUInteger as