LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
Compiler.h File Reference
#include "llvm/Config/llvm-config.h"
Include dependency graph for Compiler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __has_feature(x)   0
 
#define __has_attribute(x)   0
 
#define __has_builtin(x)   0
 
#define __GNUC_PREREQ(maj, min)   0
 Defines __GNUC_PREREQ if glibc's features.h isn't available. More...
 
#define LLVM_HAS_RVALUE_REFERENCES   0
 Does the compiler support r-value references? This implies that <utility> provides the one-argument std::move; it does not imply the existence of any other C++ library features. More...
 
#define LLVM_HAS_RVALUE_REFERENCE_THIS   0
 Does the compiler support r-value reference *this? More...
 
#define LLVM_HAS_CXX11_TYPETRAITS   0
 Does the compiler have the C++11 type traits. More...
 
#define LLVM_HAS_CXX11_STDLIB   0
 Does the compiler have the C++11 standard library. More...
 
#define LLVM_HAS_VARIADIC_TEMPLATES   0
 Does this compiler support variadic templates. More...
 
#define llvm_move(value)   (value)
 
#define LLVM_LVALUE_FUNCTION
 
#define LLVM_DELETED_FUNCTION
 
#define LLVM_FINAL
 
#define LLVM_OVERRIDE
 
#define LLVM_CONSTEXPR
 
#define LLVM_LIBRARY_VISIBILITY
 
#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_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. More...
 
#define LLVM_FUNCTION_NAME   __func__
 Expands to func on compilers which support it. Otherwise, expands to a compiler-dependent replacement. More...
 
#define __msan_allocated_memory(p, size)
 
#define __msan_unpoison(p, size)
 
#define LLVM_MEMORY_SANITIZER_BUILD   0
 Whether LLVM itself is built with MemorySanitizer instrumentation. More...
 
#define LLVM_ADDRESS_SANITIZER_BUILD   0
 Whether LLVM itself is built with AddressSanitizer instrumentation. More...
 
#define LLVM_IS_UNALIGNED_ACCESS_FAST   0
 Is unaligned memory access fast on the host machine. More...
 
#define LLVM_EXPLICIT
 Expands to explicit on compilers which support explicit conversion operators. Otherwise expands to nothing. More...
 
#define LLVM_STATIC_ASSERT(expr, msg)
 Expands to C/C++'s static_assert on compilers which support it. More...
 
#define LLVM_ENUM_INT_TYPE(intty)
 Expands to colon followed by the given integral type on compilers which support C++11 strong enums. This can be used to make enums unsigned with MSVC. More...
 
#define LLVM_HAS_INITIALIZER_LISTS   0
 Does the compiler support generalized initializers (using braced lists and std::initializer_list). More...
 

Macro Definition Documentation

#define __GNUC_PREREQ (   maj,
  min 
)    0

Defines __GNUC_PREREQ if glibc's features.h isn't available.

__GNUC_PREREQ

Definition at line 39 of file Compiler.h.

#define __has_attribute (   x)    0

Definition at line 25 of file Compiler.h.

#define __has_builtin (   x)    0

Definition at line 29 of file Compiler.h.

#define __has_feature (   x)    0

Definition at line 21 of file Compiler.h.

#define __msan_allocated_memory (   p,
  size 
)

Definition at line 341 of file Compiler.h.

Referenced by llvm::BumpPtrAllocator::Allocate().

#define __msan_unpoison (   p,
  size 
)
#define EXTERN_TEMPLATE_INSTANTIATION (   X)

Definition at line 243 of file Compiler.h.

#define LLVM_ADDRESS_SANITIZER_BUILD   0

Whether LLVM itself is built with AddressSanitizer instrumentation.

LLVM_ADDRESS_SANITIZER_BUILD

Definition at line 358 of file Compiler.h.

#define LLVM_ASSUME_ALIGNED (   p,
 
)    (p)

Returns a pointer with an assumed alignment.

LLVM_ASSUME_ALIGNED

Definition at line 326 of file Compiler.h.

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

#define LLVM_ATTRIBUTE_ALWAYS_INLINE

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 266 of file Compiler.h.

#define LLVM_ATTRIBUTE_DEPRECATED (   decl,
  message 
)    decl

Definition at line 296 of file Compiler.h.

#define LLVM_ATTRIBUTE_NOINLINE

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

Definition at line 254 of file Compiler.h.

#define LLVM_ATTRIBUTE_NORETURN

Definition at line 274 of file Compiler.h.

#define LLVM_ATTRIBUTE_UNUSED

Definition at line 199 of file Compiler.h.

#define LLVM_ATTRIBUTE_UNUSED_RESULT

Definition at line 185 of file Compiler.h.

#define LLVM_ATTRIBUTE_USED

Definition at line 179 of file Compiler.h.

#define LLVM_ATTRIBUTE_WEAK

Definition at line 207 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 314 of file Compiler.h.

#define LLVM_CONSTEXPR

Definition at line 161 of file Compiler.h.

#define LLVM_DELETED_FUNCTION

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 137 of file Compiler.h.

#define LLVM_ENUM_INT_TYPE (   intty)

Expands to colon followed by the given integral type on compilers which support C++11 strong enums. This can be used to make enums unsigned with MSVC.

LLVM_ENUM_INT_TYPE

Definition at line 403 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 381 of file Compiler.h.

#define LLVM_EXTENSION

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

Definition at line 282 of file Compiler.h.

Referenced by bindingsErrorHandler(), and LLVMInstallFatalErrorHandler().

#define LLVM_FINAL

LLVM_FINAL - Expands to 'final' if the compiler supports it. Use to mark classes or virtual methods as final.

Definition at line 146 of file Compiler.h.

#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 335 of file Compiler.h.

#define LLVM_HAS_CXX11_STDLIB   0

Does the compiler have the C++11 standard library.

LLVM_HAS_CXX11_STDLIB Implies LLVM_HAS_RVALUE_REFERENCES, LLVM_HAS_CXX11_TYPETRAITS

Definition at line 90 of file Compiler.h.

#define LLVM_HAS_CXX11_TYPETRAITS   0

Does the compiler have the C++11 type traits.

LLVM_HAS_CXX11_TYPETRAITS #include <type_traits>

  • enable_if
  • {true,false}_type
  • is_constructible
  • etc...

Definition at line 79 of file Compiler.h.

#define LLVM_HAS_INITIALIZER_LISTS   0

Does the compiler support generalized initializers (using braced lists and std::initializer_list).

Definition at line 411 of file Compiler.h.

#define LLVM_HAS_RVALUE_REFERENCE_THIS   0

Does the compiler support r-value reference *this?

Sadly, this is separate from just r-value reference support because GCC implemented everything but this thus far. No release of GCC yet has support for this feature so it is enabled with Clang only. FIXME: This should change to a version check when GCC grows support for it.

Definition at line 63 of file Compiler.h.

#define LLVM_HAS_RVALUE_REFERENCES   0

Does the compiler support r-value references? This implies that <utility> provides the one-argument std::move; it does not imply the existence of any other C++ library features.

Definition at line 51 of file Compiler.h.

#define LLVM_HAS_VARIADIC_TEMPLATES   0

Does this compiler support variadic templates.

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

Definition at line 100 of file Compiler.h.

#define LLVM_IS_UNALIGNED_ACCESS_FAST   0

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 371 of file Compiler.h.

#define LLVM_LIBRARY_VISIBILITY

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 173 of file Compiler.h.

#define LLVM_LIKELY (   EXPR)    (EXPR)
#define LLVM_LVALUE_FUNCTION

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 118 of file Compiler.h.

#define LLVM_MEMORY_SANITIZER_BUILD   0

Whether LLVM itself is built with MemorySanitizer instrumentation.

LLVM_MEMORY_SANITIZER_BUILD

Definition at line 350 of file Compiler.h.

#define llvm_move (   value)    (value)
#define LLVM_OVERRIDE

LLVM_OVERRIDE - Expands to 'override' if the compiler supports it. Use to mark virtual methods as overriding a base class method.

Definition at line 155 of file Compiler.h.

#define LLVM_READNONE

Definition at line 216 of file Compiler.h.

#define LLVM_READONLY

Definition at line 223 of file Compiler.h.

#define LLVM_STATIC_ASSERT (   expr,
  msg 
)

Expands to C/C++'s static_assert on compilers which support it.

LLVM_STATIC_ASSERT

Definition at line 391 of file Compiler.h.

#define LLVM_UNLIKELY (   EXPR)    (EXPR)

Definition at line 231 of file Compiler.h.

Referenced by llvm::raw_ostream::write().

#define TEMPLATE_INSTANTIATION (   X)

Definition at line 244 of file Compiler.h.