From 4c8b24812ddcd1dedaca343a6d4e76f91f398981 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 14 Oct 2009 18:03:49 +0000 Subject: Update clang to r84119. --- docs/LanguageExtensions.html | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'docs/LanguageExtensions.html') diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html index c855a5057a62..9ac35e1dc2dc 100644 --- a/docs/LanguageExtensions.html +++ b/docs/LanguageExtensions.html @@ -27,6 +27,7 @@ td {
  • Builtin Functions
  • Target-Specific Extensions @@ -264,7 +265,7 @@ builtins that we need to implement.

    __builtin_shufflevector

    -

    __builtin_shufflevector is used to expression generic vector +

    __builtin_shufflevector is used to express generic vector permutation/shuffle/swizzle operations. This builtin is also very important for the implementation of various target-specific header files like <xmmintrin.h>. @@ -310,6 +311,47 @@ with the same element type as vec1/vec2 but that has an element count equal to the number of indices specified.

    +

    Query for this feature with __has_builtin(__builtin_shufflevector).

    + + +

    __builtin_unreachable

    + + +

    __builtin_unreachable is used to indicate that a specific point in +the program cannot be reached, even if the compiler might otherwise think it +can. This is useful to improve optimization and eliminates certain warnings. +For example, without the __builtin_unreachable in the example below, +the compiler assumes that the inline asm can fall through and prints a "function +declared 'noreturn' should not return" warning. +

    + +

    Syntax:

    + +
    +__builtin_unreachable()
    +
    + +

    Example of Use:

    + +
    +void myabort(void) __attribute__((noreturn));
    +void myabort(void) {
    +    asm("int3");
    +    __builtin_unreachable();
    +}
    +
    + +

    Description:

    + +

    The __builtin_unreachable() builtin has completely undefined behavior. Since +it has undefined behavior, it is a statement that it is never reached and the +optimizer can take advantage of this to produce better code. This builtin takes +no arguments and produces a void result. +

    + +

    Query for this feature with __has_builtin(__builtin_unreachable).

    + +

    Target-Specific Extensions

    -- cgit v1.3