From: Akira Hatanaka Date: Tue, 6 Nov 2018 07:12:28 +0000 (+0000) Subject: Cast to uint64_t instead of to unsigned. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c46cbd2c47bf2c31d833fd4955f47179f3daf965;p=clang Cast to uint64_t instead of to unsigned. This is a follow-up to r346211. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346212 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 4699a0c16a..a42c7eb85f 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -1171,7 +1171,7 @@ RValue CodeGenFunction::emitBuiltinOSLogFormat(const CallExpr &E) { if (Item.getKind() == analyze_os_log::OSLogBufferItem::MaskKind) { uint64_t Val = 0; for (unsigned I = 0, E = Item.getMaskType().size(); I < E; ++I) - Val |= ((unsigned )Item.getMaskType()[I]) << I * 8; + Val |= ((uint64_t)Item.getMaskType()[I]) << I * 8; ArgVal = llvm::Constant::getIntegerValue(Int64Ty, llvm::APInt(64, Val)); } else if (const Expr *TheExpr = Item.getExpr()) { ArgVal = EmitScalarExpr(TheExpr, /*Ignore*/ false);