aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2013-08-21 22:11:15 +0000
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2013-08-21 22:11:15 +0000
commitdfdf7f44a9a3c3f27d3d836b0f25daf08db5e418 (patch)
treebe1cbc40692084fb8b43f0ada981b497a4d215e9 /lib
parent915e936de270c3c57df1382b683001adc2c0d695 (diff)
downloadexternal_llvm-dfdf7f44a9a3c3f27d3d836b0f25daf08db5e418.zip
external_llvm-dfdf7f44a9a3c3f27d3d836b0f25daf08db5e418.tar.gz
external_llvm-dfdf7f44a9a3c3f27d3d836b0f25daf08db5e418.tar.bz2
No functionality change.
Replace "(255 & value)" with "(0xFF & value)" to improve clarity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/SimplifyLibCalls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyLibCalls.cpp b/lib/Transforms/Utils/SimplifyLibCalls.cpp
index ff0d5d9..83636fb 100644
--- a/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -477,7 +477,7 @@ struct StrChrOpt : public LibCallOptimization {
// Compute the offset, make sure to handle the case when we're searching for
// zero (a weird way to spell strlen).
- size_t I = (255 & CharC->getSExtValue()) == 0 ?
+ size_t I = (0xFF & CharC->getSExtValue()) == 0 ?
Str.size() : Str.find(CharC->getSExtValue());
if (I == StringRef::npos) // Didn't find the char. strchr returns null.
return Constant::getNullValue(CI->getType());
@@ -513,7 +513,7 @@ struct StrRChrOpt : public LibCallOptimization {
}
// Compute the offset.
- size_t I = (255 & CharC->getSExtValue()) == 0 ?
+ size_t I = (0xFF & CharC->getSExtValue()) == 0 ?
Str.size() : Str.rfind(CharC->getSExtValue());
if (I == StringRef::npos) // Didn't find the char. Return null.
return Constant::getNullValue(CI->getType());