Anastasia added a comment. I think Clang is supposed to generate the IR specific to the target architecture. It seems strange to ignore the pointer size. I am not sure if it might lead to some issues for the backends.
================ Comment at: lib/CodeGen/CodeGenModule.cpp:107 @@ -106,2 +106,3 @@ IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); - IntPtrTy = llvm::IntegerType::get(LLVMContext, PointerWidthInBits); + IntPtrTy = llvm::IntegerType::get(LLVMContext, LangOpts.OpenCL ? + C.getTargetInfo().getOpenCLMaxPointerWidth() : PointerWidthInBits); ---------------- It seems wrong to call OpenCL specific function in generic code path? https://reviews.llvm.org/D23361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits