================
@@ -1981,6 +1981,23 @@ static bool OpenCLBuiltinToAddr(Sema &S, unsigned
BuiltinID, CallExpr *Call) {
return false;
}
+// In OpenCL, __builtin_alloca_* should return a pointer to address space
+// that corresponds to the stack address space i.e private address space.
+static bool OpenCLBuiltinAllocaAddrSpace(Sema &S, CallExpr *TheCall) {
+ QualType RT = TheCall->getType();
+ if (!RT->isPointerType() || RT->getPointeeType().hasAddressSpace())
+ return true;
----------------
arsenm wrote:
This could be an assert since you're only calling for the specific set of
builtins
https://github.com/llvm/llvm-project/pull/95750
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits