summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-07-12 06:47:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-07-12 06:47:05 +0000
commit490b8f5d64823d998fc12ad3a91ecacd82c1901e (patch)
treeb300cd035bf63b4fa2372a8b0830f904915290b4
parent6c507926532d609b1225c29878b37c562e4277f2 (diff)
downloadllvm-490b8f5d64823d998fc12ad3a91ecacd82c1901e.tar.gz
llvm-490b8f5d64823d998fc12ad3a91ecacd82c1901e.tar.bz2
llvm-490b8f5d64823d998fc12ad3a91ecacd82c1901e.tar.xz
Add parentheses around an || to correct the logic. Also silences a GCC warning
that was actually useful here. Chris, please double check that this is the correct interpretation. I was pretty sure, and ran it by Nick as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108129 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/ConstantFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index f7bd19d78c..13d8f4de48 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -439,7 +439,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C,
// Replace load with immediate integer if the result is an integer or fp
// value.
if ((NumBits >> 3) == StrLen + 1 && (NumBits & 7) == 0 &&
- isa<IntegerType>(Ty) || Ty->isFloatingPointTy()) {
+ (isa<IntegerType>(Ty) || Ty->isFloatingPointTy())) {
APInt StrVal(NumBits, 0);
APInt SingleChar(NumBits, 0);
if (TD->isLittleEndian()) {