[PATCH] D23361: [OpenCL] AMDGCN: Fix size_t type

Joey Gouly via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 07:55:54 PDT 2016


joey added a subscriber: joey.

================
Comment at: lib/CodeGen/CodeGenModule.cpp:101
@@ -100,3 +100,3 @@
   DoubleTy = llvm::Type::getDoubleTy(LLVMContext);
   PointerWidthInBits = C.getTargetInfo().getPointerWidth(0);
   PointerAlignInBytes =
----------------
What if you create a new function in TargetInfo called getMaxPointerWidth(unsigned AddrSpace), and call that here? That would by default just call 'getPointerWidth', but in your AMDGPU TargetInfo you can override that.
That feels more generic.


https://reviews.llvm.org/D23361





More information about the cfe-commits mailing list