[llvm-dev] Disabling inline compilation (Clang with VS2019)

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 28 03:15:24 PDT 2021


https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html
- looks like it might be a reasonable summary, suggests using __clang__ to
detect the use of clang, and __clang_major__, __clang_minor__,
__clang_patchlevel__ for specific version info. Looks like this is formally
documented here:
https://clang.llvm.org/docs/LanguageExtensions.html#builtin-macros

On Mon, Sep 27, 2021 at 11:54 PM John Emmas via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On 27/09/2021 19:43, David Blaikie wrote:
>
>
> https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions
> "For compatibility with existing code that compiles with MSVC, clang
> defines the _MSC_VER and _MSC_FULL_VER macros."
>
>
> Many thanks David.  And is there something that's usually defined for
> Clang but not for MSVC?  Something equivalent to CLANG_VER or
> CLANG_MAJOR_VER or whatever?
>
> John
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://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/20210928/bf74334e/attachment.html>


More information about the llvm-dev mailing list