diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-12 23:21:42 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-12 23:21:42 +0000 |
commit | c254b1d666ab0788da3f69582813afe668963a24 (patch) | |
tree | fdde59c492a3736a881961c2ac94acfa8d4bb54c /include/llvm/Target/TargetLowering.h | |
parent | a214cbbc80117685e0f0ea06b15295acda99fb38 (diff) | |
download | external_llvm-c254b1d666ab0788da3f69582813afe668963a24.zip external_llvm-c254b1d666ab0788da3f69582813afe668963a24.tar.gz external_llvm-c254b1d666ab0788da3f69582813afe668963a24.tar.bz2 |
Don't #include DerivedTypes.h in this header. Make adjustments to
compensate. Move a function out of line to TargetLowering.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 2c6b474..34bc3ad 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -22,10 +22,10 @@ #ifndef LLVM_TARGET_TARGETLOWERING_H #define LLVM_TARGET_TARGETLOWERING_H -#include "llvm/DerivedTypes.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/CodeGen/RuntimeLibcalls.h" #include <map> +#include <vector> namespace llvm { class Value; @@ -38,6 +38,7 @@ namespace llvm { class SelectionDAG; class MachineBasicBlock; class MachineInstr; + class PackedType; //===----------------------------------------------------------------------===// /// TargetLowering - This class defines information used to lower LLVM code to @@ -339,27 +340,7 @@ 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 { - switch (Ty->getTypeID()) { - default: assert(0 && "Unknown type!"); - case Type::VoidTyID: return MVT::isVoid; - 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; - case Type::PackedTyID: return MVT::Vector; - } - return MVT::isVoid; // Silence a compiler warning. - } + MVT::ValueType getValueType(const Type *Ty) const; /// getNumElements - Return the number of registers that this ValueType will /// eventually require. This is one for any types promoted to live in larger |