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 __has_feature(x)   0
#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.
#define LLVM_HAS_RVALUE_REFERENCE_THIS   0
 Does the compiler support r-value reference *this?
#define LLVM_HAS_CXX11_TYPETRAITS   0
 Does the compiler have the C++11 type traits.
#define LLVM_HAS_CXX11_STDLIB   0
 Does the compiler have the C++11 standard library.
#define LLVM_HAS_VARIADIC_TEMPLATES   0
 Does this compiler support variadic templates.
#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
#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.
#define LLVM_FUNCTION_NAME   __func__
 Expands to __func__ on compilers which support it. Otherwise, expands to a compiler-dependent replacement.
#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.
#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_STATIC_ASSERT(expr, msg)
 Expands to C/C++'s static_assert on compilers which support it.

Define Documentation

#define __has_feature (   x)    0

Definition at line 21 of file Compiler.h.

#define __msan_allocated_memory (   p,
  size 
)

Definition at line 311 of file Compiler.h.

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

#define __msan_unpoison (   p,
  size 
)

Definition at line 312 of file Compiler.h.

Referenced by LLVMX86CompilationCallback2().

#define EXTERN_TEMPLATE_INSTANTIATION (   X)

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

#define LLVM_ASSUME_ALIGNED (   p,
 
)    (p)

Returns a pointer with an assumed alignment.

LLVM_ASSUME_ALIGNED

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

#define LLVM_ATTRIBUTE_DEPRECATED (   decl,
  message 
)    decl

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

#define LLVM_ATTRIBUTE_NORETURN

Definition at line 241 of file Compiler.h.

#define LLVM_ATTRIBUTE_UNUSED

Definition at line 172 of file Compiler.h.

#define LLVM_ATTRIBUTE_USED

Definition at line 158 of file Compiler.h.

#define LLVM_ATTRIBUTE_WEAK

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

#define LLVM_CONSTEXPR

Definition at line 142 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 118 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 351 of file Compiler.h.

#define LLVM_EXTENSION

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

Definition at line 249 of file Compiler.h.

#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 127 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 305 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 71 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 60 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 44 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 32 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 81 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 341 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.

Definition at line 152 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 99 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 320 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 136 of file Compiler.h.

#define LLVM_READNONE

Definition at line 184 of file Compiler.h.

#define LLVM_READONLY

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

#define LLVM_UNLIKELY (   EXPR)    (EXPR)

Definition at line 198 of file Compiler.h.

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

#define TEMPLATE_INSTANTIATION (   X)

Definition at line 211 of file Compiler.h.