[cfe-dev] __builtin in clang?

David Blaikie dblaikie at gmail.com
Thu Jan 17 08:09:13 PST 2013


On Thu, Jan 17, 2013 at 3:31 AM, madil90 <madil90 at gmail.com> wrote:
> Hi,
>   I am writing a rewriting program. In order to search for appropriate paths
> (default c++ paths), I added headersearchoptions to the preprocessor and
> included all the default include paths clang++ uses.

Since you'll need to reproduce exactly how the source to your project
was compiled at some point anyway, you might want to consider using
the Tooling infrastructure ( http://clang.llvm.org/docs/Tooling.html )
which should simplify this task/make it easy for your rewriter to
correctly analyze the target source code.

> I am able to find all
> types. The only error that is occurring is when the program encounters
> functions similar to "__builtin_expect". It is unable to find these
> functions in any files. Some more examples of similar functions are
> "__builtin_alloca" and "__builtin_strcmp". Does clang support these
> functions? If yes, where are their definitions located?
>
> Regards,
> Adil
>
>
>
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/builtin-in-clang-tp4029821.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list