Add a helper method. The StructType element is completely redundant in most

cases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-07-12 20:36:08 +00:00
parent b370c7a41a
commit c78631f0e2

View File

@ -402,9 +402,12 @@ protected:
ConstantStruct(const StructType *T, const std::vector<Constant*> &Val); ConstantStruct(const StructType *T, const std::vector<Constant*> &Val);
public: public:
/// get() - Static factory methods - Return objects of the specified value /// get() - Static factory methods - Return objects of the specified value
///
static Constant *get(const StructType *T, const std::vector<Constant*> &V); static Constant *get(const StructType *T, const std::vector<Constant*> &V);
static Constant *get(const std::vector<Constant*> &V);
/// getType() specialization - Reduce amount of casting... /// getType() specialization - Reduce amount of casting...
///
inline const StructType *getType() const { inline const StructType *getType() const {
return reinterpret_cast<const StructType*>(Value::getType()); return reinterpret_cast<const StructType*>(Value::getType());
} }