diff options
| author | Craig Topper <craig.topper@gmail.com> | 2015-12-25 04:06:20 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2015-12-25 04:06:20 +0000 |
| commit | 370c8d6c6b6743fe3f30bb228b2e19e94f1c0279 (patch) | |
| tree | dc9bfd835786eb6edaec1667e11a8a76100f3990 /llvm/lib | |
| parent | 582d8ecf6ab40ffded6deb8b2d4a29a8fb006fa2 (diff) | |
| download | bcm5719-llvm-370c8d6c6b6743fe3f30bb228b2e19e94f1c0279.tar.gz bcm5719-llvm-370c8d6c6b6743fe3f30bb228b2e19e94f1c0279.zip | |
[IR] Mark the Type subclass helper methods 'inline' and move their definitions to DerivedTypes.h so they can be inlined by the compiler.
llvm-svn: 256406
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/Type.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp index 649962690dd..4c1baf52a58 100644 --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -163,55 +163,6 @@ bool Type::isSizedDerivedType(SmallPtrSetImpl<Type*> *Visited) const { } //===----------------------------------------------------------------------===// -// Subclass Helper Methods -//===----------------------------------------------------------------------===// - -unsigned Type::getIntegerBitWidth() const { - return cast<IntegerType>(this)->getBitWidth(); -} - -bool Type::isFunctionVarArg() const { - return cast<FunctionType>(this)->isVarArg(); -} - -Type *Type::getFunctionParamType(unsigned i) const { - return cast<FunctionType>(this)->getParamType(i); -} - -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(); -} - -uint64_t Type::getArrayNumElements() const { - return cast<ArrayType>(this)->getNumElements(); -} - -unsigned Type::getVectorNumElements() const { - return cast<VectorType>(this)->getNumElements(); -} - -unsigned Type::getPointerAddressSpace() const { - return cast<PointerType>(getScalarType())->getAddressSpace(); -} - - -//===----------------------------------------------------------------------===// // Primitive 'Type' data //===----------------------------------------------------------------------===// |

