[HIP] Move std headers after device malloc/free
authorAaron En Ye Shi <enye.shi@gmail.com>
Thu, 8 Jul 2021 19:38:32 +0000 (19:38 +0000)
committerAaron En Ye Shi <enye.shi@gmail.com>
Fri, 9 Jul 2021 21:20:16 +0000 (21:20 +0000)
commitccb10266f56bc34123eb7741c6ebcd5ba8ed3dcc
treeff00b356666e634269687d3e7aef51629b680411
parent47aeeffc8fb45c4926128657dd15eaa87edab647
[HIP] Move std headers after device malloc/free

Set the device malloc and free functions as weak,
and move the std headers after device malloc/free
to avoid issues with std malloc/free.

Fixes: SWDEV-293590

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D105707
clang/lib/Headers/__clang_hip_runtime_wrapper.h
clang/test/Headers/hip-header.hip