llvm.org GIT mirror llvm / 27984e6
add StructType helpers too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149000 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 7 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2525 class Module;
2626 class LLVMContext;
2727 class LLVMContextImpl;
28 class StringRef;
2829 template struct GraphTraits;
2930
3031 /// The instances of the Type class are immutable: once they are created,
326327 unsigned getFunctionNumParams() const;
327328 bool isFunctionVarArg() const;
328329
329 // TODO: StructType
330 StringRef getStructName() const;
331 unsigned getStructNumElements() const;
332 Type *getStructElementType(unsigned N) const;
330333
331334 Type *getSequentialElementType() const;
332335
216216 return cast(this)->getNumParams();
217217 }
218218
219 StringRef Type::getStructName() const {
220 return cast(this)->getName();
221 }
222
223 unsigned Type::getStructNumElements() const {
224 return cast(this)->getNumElements();
225 }
226
227 Type *Type::getStructElementType(unsigned N) const {
228 return cast(this)->getElementType(N);
229 }
230
231
232
219233 Type *Type::getSequentialElementType() const {
220234 return cast(this)->getElementType();
221235 }