aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-09-04 02:34:27 +0000
committerChris Lattner <sabre@nondot.org>2007-09-04 02:34:27 +0000
commit47f7dbf7c0b25505ad093a317983a9b39efe0610 (patch)
tree4289258983faf1b620a192c12e5d7ef3d3adf4c6 /CodeGen/CodeGenModule.cpp
parent34eff3929a04d69c2e10f11774145c411c880d24 (diff)
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
Diffstat (limited to 'CodeGen/CodeGenModule.cpp')
-rw-r--r--CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp
index ec3d0affae..a26e129336 100644
--- a/CodeGen/CodeGenModule.cpp
+++ b/CodeGen/CodeGenModule.cpp
@@ -67,8 +67,8 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) {
if (D->getInit() == 0) {
Init = llvm::Constant::getNullValue(GV->getType()->getElementType());
} else if (D->getType()->isIntegerType()) {
- llvm::APSInt Value(getContext().getTypeSize(D->getInit()->getType(),
- SourceLocation()));
+ llvm::APSInt Value(static_cast<unsigned>(
+ getContext().getTypeSize(D->getInit()->getType(), SourceLocation())));
if (D->getInit()->isIntegerConstantExpr(Value, Context))
Init = llvm::ConstantInt::get(Value);
}