Pass -pie to linker when generating executable on Android
This fixes problem with LTO on Android.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207520 91177308-0d34-0410-b5e6-96231b3b80d8
Add comments regarding isPIEDefault usage for r207520

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207521 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Allow single-line function in WebKit style.

Before:
  void f() {
      return; }

After:
  void f() { return; }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207527 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Remove accidentally added debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207533 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Don't bin-pack text-proto-formatted options.

Before:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
                              bbbbbbb: BBBB, bbbb: BBB}];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,
                              bbbbbbb: BBBB,
                              bbbb: BBB}];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207538 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Improve diagnosis of bridging types.
// rdar://16737117


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207542 91177308-0d34-0410-b5e6-96231b3b80d8
Reapply r207477 and r207479 without cyclic dependency

Fixed by moving ProcessWarningOptions from Frontend into Basic. All of
the dependencies for ProcessWarningOptions were already in Basic, so
this was a small change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207549 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Don't assert when combining using .* on a temporary.

While we don't model pointer-to-member operators yet (neither .* nor ->*),
CallAndMessageChecker still checks to make sure the 'this' object is not
null or undefined first. However, it also expects that the object should
always have a valid MemRegion, something that's generally important elsewhere
in the analyzer as well. Ensure this is true ahead of time, just like we do
for member access.

PR19531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207561 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Improve test from r207486.

The constructor that comes right before a variable declaration in the CFG might
not be the initialization of that variable. Previously, we just checked that
the variable's initializer expression was different from the construction
expression, but forgot to see whether the variable had an initializer expression
at all.

Thanks for the prompting, David.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207562 91177308-0d34-0410-b5e6-96231b3b80d8
Android uses -fpic for aarch64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207567 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver only thing and doesn't affect any language/preprocessor/etc. semantics.

rdar://16714526

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207570 91177308-0d34-0410-b5e6-96231b3b80d8
scanf analysis: handle scanlists that start with ^] (PR19559)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207573 91177308-0d34-0410-b5e6-96231b3b80d8
Add test case for revision 207575 to verify that on Windows, clang doesn't
crash with an assertion failure when 'nul' is passed in input.

Modified clang/test/lit.py to add feature 'system-windows' if
`platform.system()` returns 'Windows'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207576 91177308-0d34-0410-b5e6-96231b3b80d8
Drop non-cfi assembly support from clang.

After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and
always print assembly that uses cfi directives.

In llvm, MC itself supports cfi since the end of 2010 (support started
in r119972, is reported in the 2.9 release notes).

In binutils the support has been around for much longer. It looks like
support started to be added in May 2003. It is available in 2.15
(31-Aug-2011, 2.14 is from 12-Jun-2003).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207602 91177308-0d34-0410-b5e6-96231b3b80d8
Defer loading any pending update records until we've finished deserializing.
This fixes a bug where an update record causes us to load an entity that refers
to an entity we've not finished loading yet, resulting in badness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207603 91177308-0d34-0410-b5e6-96231b3b80d8
Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.

glibc expects that stddef.h only defines a single thing if either of these
defines is set.  For example, before this change, a C file containing

  #include <stdlib.h>
  int ptrdiff_t = 0;

would compile with gcc but not with clang. Now it compiles with clang too.

This also fixes PR12997, where older versions of the Linux headers would define
NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to
redefine NULL with the correct definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207606 91177308-0d34-0410-b5e6-96231b3b80d8
Add a triple to new test.

NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207607 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify test. No functional change intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207623 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM64] Add arm64_be where it was accidentally missed from a bunch of if-conditions.

I think this is the last commit for ARM64 big endian in clang. This commit makes
arm_neon.h compile correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207624 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM64] Port remaining relevant AArch64 clang tests over to ARM64

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