Add support for emitting ARM file attributes.
[oota-llvm.git] / include / llvm / Support / PatternMatch.h
index 23daad9239298ce2950dd22229519e74c68b0b4e..bee676863780e107257ada795b0a2dcc4a4a2a8a 100644 (file)
@@ -423,7 +423,7 @@ m_Select(const Cond &C, const LHS &L, const RHS &R) {
 }
 
 /// m_SelectCst - This matches a select of two constants, e.g.:
-///    m_SelectCst(m_Value(V), -1, 0)
+///    m_SelectCst<-1, 0>(m_Value(V))
 template<int64_t L, int64_t R, typename Cond>
 inline SelectClass_match<Cond, constantint_ty<L>, constantint_ty<R> >
 m_SelectCst(const Cond &C) {
@@ -453,6 +453,13 @@ struct CastClass_match {
   }
 };
 
+/// m_BitCast
+template<typename OpTy>
+inline CastClass_match<OpTy, Instruction::BitCast>
+m_BitCast(const OpTy &Op) {
+  return CastClass_match<OpTy, Instruction::BitCast>(Op);
+}
+  
 /// m_PtrToInt
 template<typename OpTy>
 inline CastClass_match<OpTy, Instruction::PtrToInt>
@@ -466,6 +473,20 @@ inline CastClass_match<OpTy, Instruction::Trunc>
 m_Trunc(const OpTy &Op) {
   return CastClass_match<OpTy, Instruction::Trunc>(Op);
 }
+
+/// m_SExt
+template<typename OpTy>
+inline CastClass_match<OpTy, Instruction::SExt>
+m_SExt(const OpTy &Op) {
+  return CastClass_match<OpTy, Instruction::SExt>(Op);
+}
+
+/// m_ZExt
+template<typename OpTy>
+inline CastClass_match<OpTy, Instruction::ZExt>
+m_ZExt(const OpTy &Op) {
+  return CastClass_match<OpTy, Instruction::ZExt>(Op);
+}
   
 
 //===----------------------------------------------------------------------===//