add a default parameter

llvm-svn: 36529
This commit is contained in:
Chris Lattner 2007-04-28 05:42:38 +00:00
parent 19651c77b2
commit f40a0a8b9f
1 changed files with 5 additions and 3 deletions

View File

@ -339,9 +339,11 @@ public:
}
/// getValueType - Return the MVT::ValueType corresponding to this LLVM type.
/// This is fixed by the LLVM operations except for the pointer size.
MVT::ValueType getValueType(const Type *Ty) const {
MVT::ValueType VT = MVT::getValueType(Ty);
/// This is fixed by the LLVM operations except for the pointer size. If
/// AllowUnknown is true, this will return MVT::Other for types with no MVT
/// counterpart (e.g. structs), otherwise it will assert.
MVT::ValueType getValueType(const Type *Ty, bool AllowUnknown = false) const {
MVT::ValueType VT = MVT::getValueType(Ty, AllowUnknown);
return VT == MVT::iPTR ? PointerTy : VT;
}