summaryrefslogtreecommitdiff
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 17:25:11 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 17:25:11 +0000
commitb8bce928f4ffdf50eff69334f3e25b27848536b6 (patch)
treee334a8f1cd0126aafd8ae6cc2ca13ed654620193 /lib/VMCore/Type.cpp
parent0873bea3ed2d740208131f7f1706b0628c0aae09 (diff)
downloadllvm-b8bce928f4ffdf50eff69334f3e25b27848536b6.tar.gz
llvm-b8bce928f4ffdf50eff69334f3e25b27848536b6.tar.bz2
llvm-b8bce928f4ffdf50eff69334f3e25b27848536b6.tar.xz
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 13fae3327b..54146e118c 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -779,28 +779,6 @@ PointerType *Type::getPointerTo(unsigned addrs) {
return PointerType::get(this, addrs);
}
-PointerType *Type::getPointerTo(const Type *Ty) {
- unsigned AS = 0;
- // For pointers, we return a new pointer based on the address space.
- if (Ty->isPointerTy()) AS = Ty->getPointerAddressSpace();
- // For vector of pointers, we return a new pointer based on the
- // address space of the element pointer type.
- if (Ty->isVectorTy())
- AS = Ty->getVectorElementType()->getPointerAddressSpace();
- // Otherwise return a pointer based on the default address space
- // since we want a pointer to the current type without having
- // a type that can give us the correct address space.
- // An example of this occuring is that you want to get a pointer to
- // all of the arguments in a function. However, the PointerType
- // for a non-pointer type cannot be determined by the type, so
- // the default value is used.
- return getPointerTo(AS);
-}
-
-PointerType *Type::getPointerTo() {
- return getPointerTo(this);
-}
-
bool PointerType::isValidElementType(Type *ElemTy) {
return !ElemTy->isVoidTy() && !ElemTy->isLabelTy() &&
!ElemTy->isMetadataTy();