OSDN Git Service

[BasicAA] Update on r259290 - added missing cast
authorGerolf Hoflehner <ghoflehner@apple.com>
Sat, 30 Jan 2016 05:35:09 +0000 (05:35 +0000)
committerGerolf Hoflehner <ghoflehner@apple.com>
Sat, 30 Jan 2016 05:35:09 +0000 (05:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259298 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp

index b11cb51..369b379 100644 (file)
@@ -327,7 +327,7 @@ static bool isObjectSize(const Value *V, uint64_t Size, const DataLayout &DL,
 static int64_t adjustToPointerSize(int64_t Offset, unsigned PointerSize) {
   assert(PointerSize <= 64 && "Invalid PointerSize!");
   unsigned ShiftBits = 64 - PointerSize;
-  return (uint64_t)Offset << ShiftBits >> ShiftBits;
+  return (int64_t)((uint64_t)Offset << ShiftBits) >> ShiftBits;
 }
 
 /// If V is a symbolic pointer expression, decompose it into a base pointer