Only read one bit for testing for a readonly type, leaving the other

bits open for future uses.

llvm-svn: 117301
This commit is contained in:
Dan Gohman 2010-10-25 20:22:29 +00:00
parent c07d8353e1
commit e6715d0755
1 changed files with 1 additions and 2 deletions

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