Sync https://gitee.com/openeuler/llvm-project/pulls/102 (cherry picked from commit 41e289aa66b2e8a068fc4bc21d63661878921d99)