@@ -286,16 +286,16 @@ class ConstOCLSPVBuiltin<string _Name, list<Type> _Signature> :
286286
287287// OpenCL v1.0/1.2/2.0 s6.1.1: Built-in Scalar Data Types.
288288def Bool : IntType<"bool", QualType<"BoolTy">, 1>;
289- def TrueChar : IntType<"char", QualType<"CharTy", 0, 1>, 8>;
289+ def TrueChar : IntType<"char", QualType<"CharTy", 0, 1>, 8>;
290290def Char : IntType<"schar", QualType<"SignedCharTy", 0, 1>, 8>;
291291def SChar : IntType<"schar", QualType<"SignedCharTy", 0, 1>, 8>;
292292def UChar : UIntType<"uchar", QualType<"UnsignedCharTy">, 8>;
293293def Short : IntType<"short", QualType<"ShortTy", 0, 1>, 16>;
294294def UShort : UIntType<"ushort", QualType<"UnsignedShortTy">, 16>;
295295def Int : IntType<"int", QualType<"IntTy", 0, 1>, 32>;
296296def UInt : UIntType<"uint", QualType<"UnsignedIntTy">, 32>;
297- def Long : IntType<"long", QualType<"LongTy ", 0, 1>, 64>;
298- def ULong : UIntType<"ulong", QualType<"UnsignedLongTy ">, 64>;
297+ def Long : IntType<"long", QualType<"getIntTypeForBitwidth(64, true) ", 0, 1>, 64>;
298+ def ULong : UIntType<"ulong", QualType<"getIntTypeForBitwidth(64, false) ">, 64>;
299299def Float : FPType<"float", QualType<"FloatTy">, 32>;
300300def Double : FPType<"double", QualType<"DoubleTy">, 64>;
301301def Half : FPType<"half", QualType<"Float16Ty">, 16>;
0 commit comments