llvm.org GIT mirror llvm / 4c27344
add a default parameter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36529 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
338338 }
339339
340340 /// getValueType - Return the MVT::ValueType corresponding to this LLVM type.
341 /// This is fixed by the LLVM operations except for the pointer size.
342 MVT::ValueType getValueType(const Type *Ty) const {
343 MVT::ValueType VT = MVT::getValueType(Ty);
341 /// This is fixed by the LLVM operations except for the pointer size. If
342 /// AllowUnknown is true, this will return MVT::Other for types with no MVT
343 /// counterpart (e.g. structs), otherwise it will assert.
344 MVT::ValueType getValueType(const Type *Ty, bool AllowUnknown = false) const {
345 MVT::ValueType VT = MVT::getValueType(Ty, AllowUnknown);
344346 return VT == MVT::iPTR ? PointerTy : VT;
345347 }
346348