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
This commit is contained in:
Dan Gohman 2010-10-25 20:22:29 +00:00
parent b1e0f76352
commit ae92af6771

View File

@ -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];
}
};
}