diff options
author | Dan Gohman <gohman@apple.com> | 2010-10-25 20:22:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-10-25 20:22:29 +0000 |
commit | ae92af6771f0a87b380706bc20e69d90bc0c1818 (patch) | |
tree | 374ca07bc26d08dbc9b637878e452ee104da6f68 | |
parent | b1e0f76352cd4a050834f57805e5c6481fd9329f (diff) |
Only read one bit for testing for a readonly type, leaving the other
bits open for future uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117301 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/TypeBasedAliasAnalysis.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/TypeBasedAliasAnalysis.cpp b/lib/Analysis/TypeBasedAliasAnalysis.cpp index 9e8f503e4f..f2fe35db33 100644 --- a/lib/Analysis/TypeBasedAliasAnalysis.cpp +++ b/lib/Analysis/TypeBasedAliasAnalysis.cpp @@ -102,8 +102,7 @@ namespace { ConstantInt *CI = dyn_cast<ConstantInt>(Node->getOperand(2)); if (!CI) return false; - // TODO: Think about the encoding. - return CI->isOne(); + return CI->getValue()[0]; } }; } |