diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-26 00:06:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-26 00:06:44 +0000 |
commit | 27984e67f7958c83e69aa15859d29867c46097a9 (patch) | |
tree | e12815f35babffa7da05e4ec47f641cc3b94ec00 /lib/VMCore | |
parent | 6e3abaa77f916341ed000b1a3883aec563967a88 (diff) | |
download | external_llvm-27984e67f7958c83e69aa15859d29867c46097a9.zip external_llvm-27984e67f7958c83e69aa15859d29867c46097a9.tar.gz external_llvm-27984e67f7958c83e69aa15859d29867c46097a9.tar.bz2 |
add StructType helpers too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Type.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 627f645..f5c88cc 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -217,6 +217,20 @@ unsigned Type::getFunctionNumParams() const { return cast<FunctionType>(this)->getNumParams(); } +StringRef Type::getStructName() const { + return cast<StructType>(this)->getName(); +} + +unsigned Type::getStructNumElements() const { + return cast<StructType>(this)->getNumElements(); +} + +Type *Type::getStructElementType(unsigned N) const { + return cast<StructType>(this)->getElementType(N); +} + + + Type *Type::getSequentialElementType() const { return cast<SequentialType>(this)->getElementType(); } |