diff options
| author | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-15 08:09:08 +0000 |
|---|---|---|
| committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-15 08:09:08 +0000 |
| commit | 402804b6d67c880c97e575342189025fe28c0f81 (patch) | |
| tree | f05c793f67afb7f12b82a43b0926afd04c0ae4ec /clang/lib/Basic/Targets.cpp | |
| parent | 61ef150d53e4a9a3f14f614991f8132a5bb4eedc (diff) | |
| download | bcm5719-llvm-402804b6d67c880c97e575342189025fe28c0f81.tar.gz bcm5719-llvm-402804b6d67c880c97e575342189025fe28c0f81.zip | |
Re-commit r289252 and r289285, and fix PR31374
llvm-svn: 289787
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 91eabb36bd3..ee84089835b 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -2245,6 +2245,13 @@ public: return CCCR_OK; } } + + // In amdgcn target the null pointer in global, constant, and generic + // address space has value 0 but in private and local address space has + // value ~0. + uint64_t getNullPointerValue(unsigned AS) const override { + return AS != LangAS::opencl_local && AS != 0 ? 0 : ~0; + } }; const Builtin::Info AMDGPUTargetInfo::BuiltinInfo[] = { |

