LLVM API Documentation

Defines
Compiler.h File Reference
#include "llvm/Config/llvm-config.h"
Include dependency graph for Compiler.h:

Go to the source code of this file.

Defines

#define LLVM_MSC_PREREQ(version)   0
 Extend the default __GNUC_PREREQ even if glibc's features.h isn't available.
#define LLVM_NOEXCEPT   noexcept
#define LLVM_HAS_RVALUE_REFERENCE_THIS   0
 Does the compiler support r-value reference *this?
#define LLVM_HAS_VARIADIC_TEMPLATES   0
 Does this compiler support variadic templates.
#define LLVM_LVALUE_FUNCTION
#define LLVM_DELETED_FUNCTION
#define LLVM_CONSTEXPR
#define LLVM_LIBRARY_VISIBILITY
#define LLVM_END_WITH_NULL
#define LLVM_ATTRIBUTE_USED
#define LLVM_ATTRIBUTE_UNUSED_RESULT
#define LLVM_ATTRIBUTE_UNUSED
#define LLVM_ATTRIBUTE_WEAK
#define LLVM_READNONE
#define LLVM_READONLY
#define LLVM_LIKELY(EXPR)   (EXPR)
#define LLVM_UNLIKELY(EXPR)   (EXPR)
#define EXTERN_TEMPLATE_INSTANTIATION(X)
#define TEMPLATE_INSTANTIATION(X)
#define LLVM_ATTRIBUTE_NOINLINE
#define LLVM_ATTRIBUTE_ALWAYS_INLINE
#define LLVM_ATTRIBUTE_NORETURN
#define LLVM_ATTRIBUTE_RETURNS_NONNULL
#define LLVM_EXTENSION
#define LLVM_ATTRIBUTE_DEPRECATED(decl, message)   decl
#define LLVM_BUILTIN_TRAP   *(volatile int*)0x11 = 0
#define LLVM_ASSUME_ALIGNED(p, a)   (p)
 Returns a pointer with an assumed alignment.
#define LLVM_FUNCTION_NAME   __func__
 Expands to __func__ on compilers which support it. Otherwise, expands to a compiler-dependent replacement.
#define LLVM_MEMORY_SANITIZER_BUILD   0
 Whether LLVM itself is built with MemorySanitizer instrumentation.
#define __msan_allocated_memory(p, size)
#define __msan_unpoison(p, size)
#define LLVM_ADDRESS_SANITIZER_BUILD   0
 Whether LLVM itself is built with AddressSanitizer instrumentation.
#define LLVM_IS_UNALIGNED_ACCESS_FAST   0
 Is unaligned memory access fast on the host machine.
#define LLVM_EXPLICIT
 Expands to explicit on compilers which support explicit conversion operators. Otherwise expands to nothing.
#define LLVM_HAS_INITIALIZER_LISTS   0
 Does the compiler support generalized initializers (using braced lists and std::initializer_list). While clang may claim it supports general initializers, if we're using MSVC's headers, we might not have a usable std::initializer list type from the STL. Disable this for now.
#define LLVM_DUMP_METHOD   LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
 Mark debug helper function definitions like dump() that should not be stripped from debug builds.

Define Documentation

#define __msan_allocated_memory (   p,
  size 
)
#define __msan_unpoison (   p,
  size 
)

Definition at line 323 of file Compiler.h.

Definition at line 214 of file Compiler.h.

Whether LLVM itself is built with AddressSanitizer instrumentation.

LLVM_ADDRESS_SANITIZER_BUILD

Definition at line 331 of file Compiler.h.

#define LLVM_ASSUME_ALIGNED (   p,
 
)    (p)

Returns a pointer with an assumed alignment.

LLVM_ASSUME_ALIGNED

Definition at line 303 of file Compiler.h.

Referenced by llvm::support::endian::read(), and llvm::support::endian::write().

LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do so, mark a method "always inline" because it is performance sensitive. GCC 3.4 supported this but is buggy in various cases and produces unimplemented errors, just use it in GCC 4.0 and later.

Definition at line 237 of file Compiler.h.

#define LLVM_ATTRIBUTE_DEPRECATED (   decl,
  message 
)    decl

Definition at line 273 of file Compiler.h.

LLVM_ATTRIBUTE_NOINLINE - On compilers where we have a directive to do so, mark a method "not for inlining".

Definition at line 225 of file Compiler.h.

Definition at line 245 of file Compiler.h.

Definition at line 251 of file Compiler.h.

Definition at line 170 of file Compiler.h.

Referenced by LowerCONCAT_VECTORS().

Definition at line 156 of file Compiler.h.

Definition at line 150 of file Compiler.h.

Definition at line 178 of file Compiler.h.

#define LLVM_BUILTIN_TRAP   *(volatile int*)0x11 = 0

LLVM_BUILTIN_UNREACHABLE - On compilers which support it, expands to an expression which states that it is undefined behavior for the compiler to reach this point. Otherwise is not defined. LLVM_BUILTIN_TRAP - On compilers which support it, expands to an expression which causes the program to exit abnormally.

Definition at line 291 of file Compiler.h.

#define LLVM_CONSTEXPR

Definition at line 126 of file Compiler.h.

LLVM_DELETED_FUNCTION - Expands to = delete if the compiler supports it. Use to mark functions as uncallable. Member functions with this should be declared private so that some behavior is kept in C++03 mode.

class DontCopy { private: DontCopy(const DontCopy&) LLVM_DELETED_FUNCTION; DontCopy &operator =(const DontCopy&) LLVM_DELETED_FUNCTION; public: ... };

Definition at line 120 of file Compiler.h.

Mark debug helper function definitions like dump() that should not be stripped from debug builds.

Definition at line 371 of file Compiler.h.

Definition at line 144 of file Compiler.h.

#define LLVM_EXPLICIT

Expands to explicit on compilers which support explicit conversion operators. Otherwise expands to nothing.

LLVM_EXPLICIT

Definition at line 354 of file Compiler.h.

#define LLVM_EXTENSION

LLVM_EXTENSION - Support compilers where we have a keyword to suppress pedantic diagnostics.

Definition at line 259 of file Compiler.h.

Referenced by bindingsErrorHandler(), LLVMContextSetDiagnosticHandler(), LLVMContextSetYieldCallback(), and LLVMInstallFatalErrorHandler().

#define LLVM_FUNCTION_NAME   __func__

Expands to __func__ on compilers which support it. Otherwise, expands to a compiler-dependent replacement.

LLVM_FUNCTION_NAME

Definition at line 312 of file Compiler.h.

Does the compiler support generalized initializers (using braced lists and std::initializer_list). While clang may claim it supports general initializers, if we're using MSVC's headers, we might not have a usable std::initializer list type from the STL. Disable this for now.

Definition at line 364 of file Compiler.h.

Does the compiler support r-value reference *this?

Sadly, this is separate from just r-value reference support because GCC implemented this later than everything else.

Definition at line 82 of file Compiler.h.

Does this compiler support variadic templates.

LLVM_HAS_VARIADIC_TEMPLATES Implies LLVM_HAS_RVALUE_REFERENCES and the existence of std::forward.

Definition at line 92 of file Compiler.h.

Is unaligned memory access fast on the host machine.

LLVM_IS_UNALIGNED_ACCESS_FAST Don't specialize on alignment for platforms where unaligned memory accesses generates the same code as aligned memory accesses for common types.

Definition at line 344 of file Compiler.h.

LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library, then the class should be private to the library and not accessible from outside it. Can also be used to mark variables and functions, making them private to any shared library they are linked into. On PE/COFF targets, library visibility is the default, so this isn't needed.

Definition at line 138 of file Compiler.h.

#define LLVM_LIKELY (   EXPR)    (EXPR)

Expands to '&' if r-value references are supported.

This can be used to provide l-value/r-value overrides of member functions. The r-value override should be guarded by LLVM_HAS_RVALUE_REFERENCE_THIS

Definition at line 102 of file Compiler.h.

Whether LLVM itself is built with MemorySanitizer instrumentation.

LLVM_MEMORY_SANITIZER_BUILD

Definition at line 321 of file Compiler.h.

#define LLVM_MSC_PREREQ (   version)    0

Extend the default __GNUC_PREREQ even if glibc's features.h isn't available.

LLVM_GNUC_PREREQ LLVM_MSC_PREREQ Is the compiler MSVC of at least the specified version? The common

Parameters:
versionvalues to check for are: 1700: Microsoft Visual Studio 2012 / 11.0 1800: Microsoft Visual Studio 2013 / 12.0

Definition at line 66 of file Compiler.h.

#define LLVM_NOEXCEPT   noexcept

Definition at line 70 of file Compiler.h.

#define LLVM_READNONE

Definition at line 187 of file Compiler.h.

#define LLVM_READONLY

Definition at line 194 of file Compiler.h.

#define LLVM_UNLIKELY (   EXPR)    (EXPR)
#define TEMPLATE_INSTANTIATION (   X)

Definition at line 215 of file Compiler.h.