This patch ensures built-in functions are rewritten using the proper
parent declaration. Tests are added to ensure the functionality works
also with C++ for OpenCL.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34193 Build 34192: arc lint + arc unit
Event Timeline
Comment Actions
I would say in the interest of saving testing time running one of those test in C++ mode should be enough.
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
5411 | I think these builtins were added before we could specify address spaces in tablegen file. So I think we should actually change these builtins to add the address spaces on pointers such that this code wouldn't be called at all. But your fix is still needed for general cases. If you either write FIXME next to the OpenCL builtins in Builtins.td to add the address spaces or create a bugzilla bug describing this problem I am happy to go ahead with this patch. |
Comment Actions
I added the FIXME and reduced the amount of testing. Let me know if it looks alright.
I think these builtins were added before we could specify address spaces in tablegen file. So I think we should actually change these builtins to add the address spaces on pointers such that this code wouldn't be called at all. But your fix is still needed for general cases.
If you either write FIXME next to the OpenCL builtins in Builtins.td to add the address spaces or create a bugzilla bug describing this problem I am happy to go ahead with this patch.