================
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C,
   IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth());
   IntPtrTy = llvm::IntegerType::get(LLVMContext,
     C.getTargetInfo().getMaxPointerWidth());
-  Int8PtrTy = llvm::PointerType::get(LLVMContext, 0);
+  Int8PtrTy = llvm::PointerType::get(LLVMContext,
----------------
arsenm wrote:

> I don't think mixing languages with different LangAS maps is sound

It is entirely sound, and required for this entire system to work (e.g. we 
implement the libraries in OpenCL used by all the languages). The point of the 
LangAS is to map to the target address space, which does not care what the 
language is. Different languages should be trying to be ABI compatible with 
each other, which includes emitting the correct IR address space 

https://github.com/llvm/llvm-project/pull/88182
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to