Sync https://gitee.com/openeuler/llvm-project/pulls/76 (cherry picked from commit e595b466af2018f7d739cb6b6ec24697a2bb8464)