Page MenuHomePhabricator

[Clang] Add clang attribute `clang_builtin_alias`.
AbandonedPublic

Authored by HsiangKai on Apr 21 2021, 12:37 AM.

Details

Summary

In some cases, we want to provide the alias name for the clang builtins.
For example, the arguments must be constant integers for some RISC-V builtins.
If we use wrapper functions, we could not constrain the arguments be constant
integer. This attribute is used to achieve the purpose.

Besides this, use clang_builtin_alias is more efficient than using
wrapper functions. We use this attribute to deal with test time issue
reported in https://bugs.llvm.org/show_bug.cgi?id=49962.

Diff Detail