Add parentheses to silence gcc warning.
authorRichard Trieu <rtrieu@google.com>
Wed, 31 Jul 2013 04:07:28 +0000 (04:07 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 31 Jul 2013 04:07:28 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187482 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Instructions.cpp

index d88fb6d4e3cdae9d73a786ab6d368f6137479ae6..205cb43e39484186282432c1f0f33886a86e21fd 100644 (file)
@@ -2419,8 +2419,8 @@ CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
   assert((Ty->isIntOrIntVectorTy() || Ty->isPtrOrPtrVectorTy()) &&
          "Invalid cast");
   assert(Ty->isVectorTy() == S->getType()->isVectorTy() && "Invalid cast");
-  assert(!Ty->isVectorTy() ||
-         Ty->getVectorNumElements() == S->getType()->getVectorNumElements() &&
+  assert((!Ty->isVectorTy() ||
+          Ty->getVectorNumElements() == S->getType()->getVectorNumElements()) &&
          "Invalid cast");
 
   if (Ty->isIntOrIntVectorTy())
@@ -2436,8 +2436,8 @@ CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
   assert((Ty->isIntOrIntVectorTy() || Ty->isPtrOrPtrVectorTy()) &&
          "Invalid cast");
   assert(Ty->isVectorTy() == S->getType()->isVectorTy() && "Invalid cast");
-  assert(!Ty->isVectorTy() ||
-         Ty->getVectorNumElements() == S->getType()->getVectorNumElements() &&
+  assert((!Ty->isVectorTy() ||
+          Ty->getVectorNumElements() == S->getType()->getVectorNumElements()) &&
          "Invalid cast");
 
   if (Ty->isIntOrIntVectorTy())