mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
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:
@ -376,9 +376,10 @@ APInt ObjectSizeOffsetVisitor::align(APInt Size, uint64_t Align) {
|
||||
ObjectSizeOffsetVisitor::ObjectSizeOffsetVisitor(const DataLayout *TD,
|
||||
const TargetLibraryInfo *TLI,
|
||||
LLVMContext &Context,
|
||||
bool RoundToAlign)
|
||||
bool RoundToAlign,
|
||||
unsigned AS)
|
||||
: TD(TD), TLI(TLI), RoundToAlign(RoundToAlign) {
|
||||
IntegerType *IntTy = TD->getIntPtrType(Context);
|
||||
IntegerType *IntTy = TD->getIntPtrType(Context, AS);
|
||||
IntTyBits = IntTy->getBitWidth();
|
||||
Zero = APInt::getNullValue(IntTyBits);
|
||||
}
|
||||
@ -561,9 +562,10 @@ SizeOffsetType ObjectSizeOffsetVisitor::visitInstruction(Instruction &I) {
|
||||
|
||||
ObjectSizeOffsetEvaluator::ObjectSizeOffsetEvaluator(const DataLayout *TD,
|
||||
const TargetLibraryInfo *TLI,
|
||||
LLVMContext &Context)
|
||||
LLVMContext &Context,
|
||||
unsigned AS)
|
||||
: TD(TD), TLI(TLI), Context(Context), Builder(Context, TargetFolder(TD)) {
|
||||
IntTy = TD->getIntPtrType(Context);
|
||||
IntTy = TD->getIntPtrType(Context, AS);
|
||||
Zero = ConstantInt::get(IntTy, 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user