[llvm-dev] warning during intrinsic defintion

Nemanja Ivanovic via llvm-dev llvm-dev at lists.llvm.org
Mon May 30 12:27:30 PDT 2016


I don't really know exactly why you're getting this, but it seems like you
forgot the last line in your Builtins<Target>.def. Namely, the line:
#undef BUILTIN

On Thu, May 26, 2016 at 1:29 AM, Rail Shafigulin via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I've introduced intrinsics for my target however when I compile llvm+clang
> I get a a redefinition warning:
>
> llvm/tools/clang/lib/Basic/Targets.cpp:904:0: warning: "BUILTIN" redefined
> [enabled by default]
>  #define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES },
>  ^
>
> In file included from llvm/tools/clang/lib/Basic/Targets.cpp:26:0:
> llvm/tools/clang/include/clang/Basic/TargetBuiltins.h:164:0: note: this is
> the location of the previous definition
>  #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
>
> I pretty much copied what other targets did when they defined intrinsics.
> Why this happens for my target but not for the others?
>
> Any help is appreciated.
>
> --
> Rail Shafigulin
> Software Engineer
> Esencia Technologies
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160530/5562cd7e/attachment.html>


More information about the llvm-dev mailing list