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

Reid Spencer rspencer at reidspencer.com
Fri Jan 12 15:23:38 PST 2007


Done.

On Fri, 2007-01-12 at 14:46 -0800, Chris Lattner wrote:
> > TargetLowering.h updated: 1.98 -> 1.99
> >
> > -#include "llvm/Type.h"
> > +#include "llvm/DerivedTypes.h"
> >  #include "llvm/CodeGen/SelectionDAGNodes.h"
> >  #include <map>
> >
> > @@ -429,11 +429,16 @@
> >      switch (Ty->getTypeID()) {
> 
> Please move this method out of line, so that TargetLowering.h doesn't  
> have to pull in DerivedTypes.h
> 
> Thanks,
> 
> -Chris
> 
> >      default: assert(0 && "Unknown type!");
> >      case Type::VoidTyID:    return MVT::isVoid;
> > -    case Type::Int1TyID:    return MVT::i1;
> > -    case Type::Int8TyID:    return MVT::i8;
> > -    case Type::Int16TyID:   return MVT::i16;
> > -    case Type::Int32TyID:   return MVT::i32;
> > -    case Type::Int64TyID:   return MVT::i64;
> > +    case Type::IntegerTyID:
> > +      switch (cast<IntegerType>(Ty)->getBitWidth()) {
> > +        default: assert(0 && "Invalid width for value type");
> > +        case 1:    return MVT::i1;
> > +        case 8:    return MVT::i8;
> > +        case 16:   return MVT::i16;
> > +        case 32:   return MVT::i32;
> > +        case 64:   return MVT::i64;
> > +      }
> > +      break;
> >      case Type::FloatTyID:   return MVT::f32;
> >      case Type::DoubleTyID:  return MVT::f64;
> >      case Type::PointerTyID: return PointerTy;
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list