[llvm] r189000 - Add a new helper method to Value to strip in-bounds constant offsets of

Matt Arsenault arsenm2 at gmail.com
Mon Sep 16 11:32:48 PDT 2013


On Sep 16, 2013, at 5:07 , Duncan Sands <duncan.sands at gmail.com> wrote:

>> 
>> +  assert(Offset.getBitWidth() == DL.getPointerSizeInBits(cast<PointerType>(
>> +                                     getType())->getAddressSpace()) &&
>> +         "The offset must have exactly as many bits as our pointer.");
> 
> Is there really no neater way of getting the pointer size in bits?  If not,
> maybe add a helper for that?
> 
You can use getType()->getPointerAddressSpace(), but for here you can use DL.getPointerTypeSizeInBits(getType())





More information about the llvm-commits mailing list