Objective-C SDK modernizer. Patch to support modernization
to NS_ENUM/NS_OPTION macros when typedef names are other
than NSInteger/NSUInteger (int8_t, etc.).
rdar://18532199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219173 91177308-0d34-0410-b5e6-96231b3b80d8
driver: Map closed standard file descriptors to /dev/null

Utilize Process::FixupStandardFileDescriptors, introduced in r219170, to
guard against files from being treated as one of the standard file
descriptors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219174 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Small refactoring of EmitOMPSimdLoop helper routine.
No functional changes intended.
Renamed EmitOMPSimdLoop to EmitOMPInnerLoop, I plan to re-use
it to emit inner loop in the future patches for CodeGen of the
worksharing loop directives (omp for, omp for simd).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219195 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] 'omp teams' directive basic support.
Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219197 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Add documentation about disabling formatting.

Patch by Marek Kurdej, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219204 91177308-0d34-0410-b5e6-96231b3b80d8
Allow dllexport alias to base destructors.

We used to avoid these, but it looks like we did so just because we were
not handling dllexport alias correctly.

Dario Domizioli fixed that, so allow these aliases.

Based on a patch by Dario Domizioli!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219206 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix bug with comments between non-trival parameters.

Before:
  SomeFunction(a, a,
               // comment
                      b + x);

After:
  SomeFunction(a, a,
               // comment
               b + x);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219209 91177308-0d34-0410-b5e6-96231b3b80d8
Emit diagnostic for -munaligned-access on v6m

Patch by: Charlie Turner <charlie.turner@arm.com>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219211 91177308-0d34-0410-b5e6-96231b3b80d8
PR21180: Lambda closure types are neither aggregates nor literal types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219222 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C SDK modernization. When modernizing to
use NS_ENUM/NS_OPTIONS macros, add an import of
Foundation.h (or its module) as necessary.
rdar://18498550


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219225 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid code duplication by calling setAliasAttributes in EmitAliasDefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219258 91177308-0d34-0410-b5e6-96231b3b80d8
Fix IRGen for referencing a static local before emitting its decl

Summary:
Previously CodeGen assumed that static locals were emitted before they
could be accessed, which is true for automatic storage duration locals.
However, it is possible to have CodeGen emit a nested function that uses
a static local before emitting the function that defines the static
local, breaking that assumption.

Fix it by creating the static local upon access and ensuring that the
deferred function body gets emitted. We may not be able to emit the
initializer properly from outside the function body, so don't try.

Fixes PR18020.  See also previous attempts to fix static locals in
PR6769 and PR7101.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219265 91177308-0d34-0410-b5e6-96231b3b80d8
Fix test case in no asserts build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219266 91177308-0d34-0410-b5e6-96231b3b80d8
Disallow using function parameters in extended asm inputs or outputs in naked functions (PR21178)

Clang won't emit any prologues for such functions, so it would assert trying to
codegen the parameter references.

This patch makes Clang check the extended asm inputs and outputs for
references to function parameters.

Differential Revision: http://reviews.llvm.org/D5640

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219272 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Fix a typo (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219279 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive."

This reverts commit r219197 because it broke ARM self-hosting buildbots with
segmentation fault errors in many tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219289 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Codegen for 'firstprivate' clause.
This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.
In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D5140


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219295 91177308-0d34-0410-b5e6-96231b3b80d8
Revert back r219295.
To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219296 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Codegen for 'firstprivate' clause.
This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.
In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D5140


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219297 91177308-0d34-0410-b5e6-96231b3b80d8
Revert commit r219297.
Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots).


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