Add attributes for AMDGPU register limits.

This is a performance hint that can be applied to kernels
to attempt to limit the number of used registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223384 91177308-0d34-0410-b5e6-96231b3b80d8
Silence warning: "NOMINMAX" redefined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223391 91177308-0d34-0410-b5e6-96231b3b80d8
Adding a FIXME to the code, based on a discussion in IRC; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223403 91177308-0d34-0410-b5e6-96231b3b80d8
Recognize __unaligned keyword after type specifier

The __unaligned keyword can appear after a struct definition:

  struct foo {...} __unaligned *x;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223412 91177308-0d34-0410-b5e6-96231b3b80d8
Parse qualifiers after comma in declarator lists as a Microsoft extension

MSVC parses and ignores these with a warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223413 91177308-0d34-0410-b5e6-96231b3b80d8
Use isOSBinFormatMachO() instead of comparing the object format
against an enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223422 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Eliminated endless loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223426 91177308-0d34-0410-b5e6-96231b3b80d8
Have the driver and the target code agree on what the default ABI
is for each machine. Fix up darwin tests that were testing for
aapcs on armv7-ios when the actual ABI is apcs.

Should be no user visible change without -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223429 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Instead of storing absolute paths in a .pcm file, store the path to
the root of the module and use paths relative to that directory wherever
possible. This is a step towards allowing explicit modules to be relocated
without being rebuilt, which is important for some kinds of distributed builds,
for good paths in diagnostics, and for appropriate .d output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223443 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Codegen for 'omp barrier' directive.
Adds generation of call to "i32 kmpc_cancel_barrier(ident_t *, i32)" libcall for explicitly specified barriers (OMP_IDENT_BARRIER_EXPL flag is added to "flags" field of "ident_t" structure).
Also this patch replaces all calls to "kmpc_barrier" function by calls of "__kmpc_cancel_barrier" function which provides additional functionality for OpenMP 4.0.
Also, library specific enum OpenMPLocationFlags moved to private section of CGOpenMPRuntime class to make it more independent from library implementation.
Differential Revision: http://reviews.llvm.org/D6447


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223444 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Test for 'omp barrier' directive


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223445 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Cleanup -fexceptions behavior

No functionality change is intended, just a cleanup of the logic clang
uses to determine what -fexceptions/-fno-exceptions ends up doing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223453 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Objective-C should respect -fno-exceptions

Clang attempted to replicate a GCC bug: -fobjc-exceptions forces
-fexceptions to be enabled.  However, this has unintended effects and
other awkard side effects that Clang doesn't "correctly" ape (e.g. it's
impossible to turn off C++ exceptions in ObjC++ mode).

Instead, -f[no]objc-exceptions and -f[no]cxx-exceptions now have an
identical relationship with -f[no]exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223455 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Support NS_OPTIONS, CF_ENUM and CF_OPTIONS.

This fixes llvm.org/PR21756.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223458 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a warning with generating the attribute documentation; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223463 91177308-0d34-0410-b5e6-96231b3b80d8
Temporarily reverting r223443 due to bot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223465 91177308-0d34-0410-b5e6-96231b3b80d8
Added a new preprocessor macro: __has_declspec_attribute. This can be used as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to  __has_attribute and __has_cpp_attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223467 91177308-0d34-0410-b5e6-96231b3b80d8
Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223468 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Typos in include/clang-c/Index.h
Phabricator revision: http://reviews.llvm.org/D6507

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223471 91177308-0d34-0410-b5e6-96231b3b80d8
Amending r223468 with this documentation change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223479 91177308-0d34-0410-b5e6-96231b3b80d8