[all-commits] [llvm/llvm-project] d1d93d: [Clang] Fix __ptr32 arguments passed to builtins
Ariel-Burton via All-commits
all-commits at lists.llvm.org
Mon Feb 6 11:54:01 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1d93da701b1609bdd992e57be60bb58c6d080cc
https://github.com/llvm/llvm-project/commit/d1d93da701b1609bdd992e57be60bb58c6d080cc
Author: Ariel Burton <Ariel.Burton at ibm.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M clang/lib/Sema/SemaExpr.cpp
M clang/test/CodeGen/address-space-ptr32.c
Log Message:
-----------
[Clang] Fix __ptr32 arguments passed to builtins
Currently when clang deals with a call to a builtin function that
is supplied with an argument that has an explicit address space
it rewrites the signature of the callee to make the types of
the formal parameters match those of the actual arguments.
This functionality was added to support OpenCL, and was
introduced with commit b919c7d.
However, this does not work properly for "size" related address
spaces such as those used for __ptr32. This affects platforms
like Microsoft and z/OS.
This change preserves the OpenCL functionality, but will use
the formal parameter types when an address space is size-related.
Reviewed By: akhuang
Differential Revision: https://reviews.llvm.org/D142048
More information about the All-commits
mailing list