diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-07-12 20:36:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-07-12 20:36:08 +0000 |
| commit | 5eb09d1dedbc94589fbd0d14d74ad30ef8f3449a (patch) | |
| tree | 16781767bf939b0e7e609b0b65513f481724e820 | |
| parent | d6108ca27e8904fa0ad55c599231663aee37fea0 (diff) | |
| download | bcm5719-llvm-5eb09d1dedbc94589fbd0d14d74ad30ef8f3449a.tar.gz bcm5719-llvm-5eb09d1dedbc94589fbd0d14d74ad30ef8f3449a.zip | |
Add a helper method. The StructType element is completely redundant in most
cases
llvm-svn: 14777
| -rw-r--r-- | llvm/include/llvm/Constants.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Constants.h b/llvm/include/llvm/Constants.h index fbb7a42f5db..324f5061208 100644 --- a/llvm/include/llvm/Constants.h +++ b/llvm/include/llvm/Constants.h @@ -402,9 +402,12 @@ protected: ConstantStruct(const StructType *T, const std::vector<Constant*> &Val); public: /// 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 std::vector<Constant*> &V); /// getType() specialization - Reduce amount of casting... + /// inline const StructType *getType() const { return reinterpret_cast<const StructType*>(Value::getType()); } |

