Sync https://gitee.com/openeuler/llvm-project/pulls/104 (cherry picked from commit 2193591dd088ef8b1ba46ced0eb3c4799a467254)