[cfe-dev] how to declare overloaded functions in Builtins.def?

lostknight thanhtuan at aces.snu.ac.kr
Tue Aug 6 19:27:53 PDT 2013


I am sorry if this question is asked already.

I am using Clang 3.2 and wanting to support overloaded built-in functions. I
notice in the file Builtins.def, only cos(double) is supported. I want to
add support for cos(float) and cos(floatN) where floatN is vector type. How
can I do this? If I add another BUILTIN(cos, "E4fE4f", "nt") it will be
expanded to the same macro has BUILTIN(cos, "dd", "nt").

My second question is, does the third argument matter for parsing? (e.g.,
"nt"). If I just want to declare a very normal builtin without any special
description, what is the safest way to use?

Thank



--
View this message in context: http://clang-developers.42468.n3.nabble.com/how-to-declare-overloaded-functions-in-Builtins-def-tp4033781.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list