[PATCH] D111682: [TableGen][PGO] Disable profile instrumentation for printInstruction function
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 12:14:38 PDT 2021
xur added inline comments.
================
Comment at: llvm/include/llvm/Support/Compiler.h:38
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
----------------
rnk wrote:
> `__has_attribute` is defined to false here if it is not available. I believe that will handle MSVC.
Is this for __has_attriubte__ itself? I thought __has_attribute(<attribute>) is defined in some config.
For example, the "noinline" attribute, it is also defined for MSVC -- otherwise, the check of MSC_VER is useless.
#if __has_attribute(noinline)
#define LLVM_ATTRIBUTE_NOINLINE __attribute__((noinline))
#elif defined(_MSC_VER)
#define LLVM_ATTRIBUTE_NOINLINE __declspec(noinline)
#else
#define LLVM_ATTRIBUTE_NOINLINE
#endif
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111682/new/
https://reviews.llvm.org/D111682
More information about the llvm-commits
mailing list