diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-04-28 05:42:38 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-04-28 05:42:38 +0000 |
| commit | f40a0a8b9f078888476a1066eef2868d0c425d1c (patch) | |
| tree | c1aa23811b938d4e847c7f07105c2d9b489552c2 | |
| parent | 19651c77b204c504a245f2017d8544e0e9304933 (diff) | |
| download | bcm5719-llvm-f40a0a8b9f078888476a1066eef2868d0c425d1c.tar.gz bcm5719-llvm-f40a0a8b9f078888476a1066eef2868d0c425d1c.zip | |
add a default parameter
llvm-svn: 36529
| -rw-r--r-- | llvm/include/llvm/Target/TargetLowering.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h index c862371c93a..68807081305 100644 --- a/llvm/include/llvm/Target/TargetLowering.h +++ b/llvm/include/llvm/Target/TargetLowering.h @@ -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; } |

