From: Mike Stump Date: Tue, 13 Oct 2009 21:31:09 +0000 (+0000) Subject: Ensure we sign extend. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd542a1d8f231f9c162df66598af13ae1c6f4f07;p=clang Ensure we sign extend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84031 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 82ba93e654..f3612a39d3 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -94,8 +94,8 @@ public: llvm::Constant *m = wrap(BaseOffset); m = wrap((0?700:0) + BaseOffset); if (updateVBIndex) - VBIndex[Base] = -(offsets.size()*LLVMPointerWidth/8) - - 3*LLVMPointerWidth/8; + VBIndex[Base] = (ssize_t)(-(offsets.size()*LLVMPointerWidth/8) + - 3*LLVMPointerWidth/8); offsets.push_back(m); } GenerateVBaseOffsets(offsets, Base, Offset, updateVBIndex);