Added two minor methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1187 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/RegAlloc/LiveRange.h b/lib/CodeGen/RegAlloc/LiveRange.h
index 23c217c..5b7b7ca 100644
--- a/lib/CodeGen/RegAlloc/LiveRange.h
+++ b/lib/CodeGen/RegAlloc/LiveRange.h
@@ -131,12 +131,15 @@
inline IGNode * getUserIGNode() const
{ return UserIGNode; } // NULL if the user is not allocated
- inline Type::PrimitiveID getTypeID() const {
+ inline const Type* getType() const {
const Value *val = *begin();
assert(val && "Can't find type - Live range is empty" );
- return (val->getType())->getPrimitiveID();
+ return val->getType();
}
-
+
+ inline Type::PrimitiveID getTypeID() const {
+ return this->getType()->getPrimitiveID();
+ }
inline void setSuggestedColor(int Col) {
//assert( (SuggestedColor == -1) && "Changing an already suggested color");