[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h

Chris Lattner sabre at nondot.org
Fri Apr 27 22:42:56 PDT 2007



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.123 -> 1.124
---
Log message:

add a default parameter


---
Diffs of the changes:  (+5 -3)

 TargetLowering.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.123 llvm/include/llvm/Target/TargetLowering.h:1.124
--- llvm/include/llvm/Target/TargetLowering.h:1.123	Mon Apr 16 13:10:22 2007
+++ llvm/include/llvm/Target/TargetLowering.h	Sat Apr 28 00:42:38 2007
@@ -339,9 +339,11 @@
   }
 
   /// 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;
   }
 






More information about the llvm-commits mailing list