``__BASE_FILE__``
Defined to a string that contains the name of the main input file passed to
Clang.
-
+
``__FILE_NAME__``
Clang-specific extension that functions similar to ``__FILE__`` but only
renders the last path component (the filename) instead of an invocation
- dependent full path to that file.
+ dependent full path to that file.
``__COUNTER__``
Defined to an integer value that starts at zero and is incremented each time
-----------------------------------------
In Objective-C, functions and methods are generally assumed to follow the
-`Cocoa Memory Management
+`Cocoa Memory Management
<https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html>`_
conventions for ownership of object arguments and
return values. However, there are exceptions, and so Clang provides attributes
**Description**:
The '``__builtin_rotateleft``' family of builtins is used to rotate
-the bits in the first argument by the amount in the second argument.
+the bits in the first argument by the amount in the second argument.
For example, ``0b10000110`` rotated left by 11 becomes ``0b00110100``.
The shift value is treated as an unsigned amount modulo the size of
the arguments. Both arguments and the result have the bitwidth specified
**Description**:
The '``__builtin_rotateright``' family of builtins is used to rotate
-the bits in the first argument by the amount in the second argument.
+the bits in the first argument by the amount in the second argument.
For example, ``0b10000110`` rotated right by 3 becomes ``0b11010000``.
The shift value is treated as an unsigned amount modulo the size of
the arguments. Both arguments and the result have the bitwidth specified
There are two atomic builtins with min/max in-memory comparison and swap.
The syntax and semantics are similar to GCC-compatible __atomic_* builtins.
-* ``__atomic_fetch_min``
-* ``__atomic_fetch_max``
+* ``__atomic_fetch_min``
+* ``__atomic_fetch_max``
The builtins work with signed and unsigned integers and require to specify memory ordering.
The return value is the original value that was stored in memory before comparison.
--------------------------------
.. warning::
- This is a work in progress. Compatibility across Clang/LLVM releases is not
+ This is a work in progress. Compatibility across Clang/LLVM releases is not
guaranteed.
Clang provides experimental builtins to support C++ Coroutines as defined by
development of the coroutine feature. See `Coroutines in LLVM
<https://llvm.org/docs/Coroutines.html#intrinsics>`_ for
more information on their semantics. Note that builtins matching the intrinsics
-that take token as the first parameter (llvm.coro.begin, llvm.coro.alloc,
+that take token as the first parameter (llvm.coro.begin, llvm.coro.alloc,
llvm.coro.free and llvm.coro.suspend) omit the token parameter and fill it to
an appropriate value during the emission.
- 2 - round to +infinity
- 3 - round to -infinity
-Note that the mode argument will modulo 4, so if the int argument is greater
-than 3, it will only use the least significant two bits of the mode.
+Note that the mode argument will modulo 4, so if the int argument is greater
+than 3, it will only use the least significant two bits of the mode.
Namely, ``__builtin_setrnd(102))`` is equal to ``__builtin_setrnd(2)``.
PowerPC Language Extensions
- 3 - round to -infinity
Note that the mode argument will modulo 4, so if the integer argument is greater
-than 3, it will only use the least significant two bits of the mode.
+than 3, it will only use the least significant two bits of the mode.
Namely, ``__builtin_setrnd(102))`` is equal to ``__builtin_setrnd(2)``.
PowerPC Language Extensions
- 3 - round to -infinity
Note that the mode argument will modulo 4, so if the integer argument is greater
-than 3, it will only use the least significant two bits of the mode.
+than 3, it will only use the least significant two bits of the mode.
Namely, ``__builtin_setrnd(102))`` is equal to ``__builtin_setrnd(2)``.
PowerPC cache builtins