================
@@ -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,
----------------
AlexVlx 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

I am aware of what we decided to do. Whether or not that is actually sound is a 
different kettle of fish, but let's agree to disagree and move on. Stepping 
back, I'm trying to figure out what the actual suggestion is. Reverting the 
change is wrong, because there are other targets where for which 0 is 
definitely not a sound default, and this impacts more than the 
`used`/`compiler.used` arrays. Seems like there are two viable options:

1. I'm going to propose changing `emitUsed` anyway, since that makes sense even 
if the AS is indeed mostly meaningless there
2. IMHO OCL should default to `AMDGPUDefIsGenMap` for its LangAS map, which 
would "fix" this as well.
 
If there's some third reasonable solution, I apologise for missing it - please 
share!

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