Add in support for getIntPtrType to get the pointer type based on the address space.

This checkin also adds in some tests that utilize these paths and updates some of the
clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Micah Villmow
2012-10-24 15:52:52 +00:00
parent 3575222175
commit aa76e9e2cf
46 changed files with 813 additions and 450 deletions

View File

@ -728,7 +728,7 @@ static Constant *stripAndComputeConstantOffsets(const DataLayout &TD,
assert(V->getType()->isPointerTy() && "Unexpected operand type!");
} while (Visited.insert(V));
Type *IntPtrTy = TD.getIntPtrType(V->getContext());
Type *IntPtrTy = TD.getIntPtrType(V->getContext(), AS);
return ConstantInt::get(IntPtrTy, Offset);
}