From 908aabb783ce922021142dffd80676be6db0ebb0 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 6 Nov 2018 07:12:28 +0000 Subject: [PATCH] Cast to uint64_t instead of to unsigned. This is a follow-up to r346211. llvm-svn: 346212 --- clang/lib/CodeGen/CGBuiltin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 4699a0c16ad9..a42c7eb85f9c 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/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);