eliminate some VC++ warnings, patch contributed by Hartmut Kaiser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41692 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index 1cc33bd..e0a8718 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -517,7 +517,7 @@
assert(RetType->isIntegerType() && "Result type must be an integer!");
- unsigned ResultWidth = CGF.getContext().getTypeSize(RetType,SourceLocation());
+ unsigned ResultWidth = static_cast<unsigned>(CGF.getContext().getTypeSize(RetType,SourceLocation()));
return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val));
}