llvm_any_ty equivalent in builtins


I have two intrinsics that take llvm_any_ty as an argument type (RV in one intrinsic and as an LValue in the other).
What should be the equivalent builtin definition for this intrinsic? Is dot “.” the appropriate one to use?


There isn't any true equivalent to llvm_any_ty in clang, because it usually doesn't really make sense; a function usually has to have a specific type. But you can use the "t" flag in Builtins.def to turn off normal type-checking, implement custom rules in Sema::CheckBuiltinFunctionCall, and implement custom code generation in CGBuiltin. See, for example, __sync_fetch_and_add.