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