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
This commit is contained in:
Chandler Carruth 2010-07-12 06:47:05 +00:00
parent 6c50792653
commit 490b8f5d64

View File

@ -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()) {