Rename ConstantSDNode's getSignExtended to getSExtValue, for

consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2008-09-26 21:54:37 +00:00
parent f275250333
commit 7810bfed55
10 changed files with 30 additions and 34 deletions

View File

@@ -1721,11 +1721,7 @@ public:
const ConstantInt *getConstantIntValue() const { return Value; }
const APInt &getAPIntValue() const { return Value->getValue(); }
uint64_t getZExtValue() const { return Value->getZExtValue(); }
int64_t getSignExtended() const {
unsigned Bits = getValueType(0).getSizeInBits();
return ((int64_t)getZExtValue() << (64-Bits)) >> (64-Bits);
}
int64_t getSExtValue() const { return Value->getSExtValue(); }
bool isNullValue() const { return Value->isNullValue(); }
bool isAllOnesValue() const { return Value->isAllOnesValue(); }