Transform pattern:
  if (CGM.getModuleDebugInfo())
    DebugInfo = CGM.getModuleDebugInfo()
into a call:
  maybeInitializeDebugInfo();

This is a simplification for a possible future fix of PR13942.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166019 91177308-0d34-0410-b5e6-96231b3b80d8
GNUstep runtime version default to 1.6, generate correct property attribute
metadata.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023 91177308-0d34-0410-b5e6-96231b3b80d8
fixes an objc crash involving objc bool literal on
hopelessly poorly written code after spewing several
errors. // rdar://12491143


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166025 91177308-0d34-0410-b5e6-96231b3b80d8
Minor tweak to last patch along with a test case.
// rdar://12491143


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166030 91177308-0d34-0410-b5e6-96231b3b80d8
When using a symbol with attribute weakref, search for it first and
don't try the normal GetOrCreateLLVM. The latter could drop the weak
atrtibute on the second reference, if there is no explicit declaration
of the aliasee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166032 91177308-0d34-0410-b5e6-96231b3b80d8
Implement GCC's -Wint-to-pointer-cast.

This implementation doesn't warn on anything that GCC doesn't warn on with the
exception of templates specializations (GCC doesn't warn, Clang does). The
specific skipped cases (boolean, constant expressions, enums) are open for
debate/adjustment if anyone wants to demonstrate that GCC is being overly
conservative here. The only really obvious false positive I found was in the
Clang regression suite's MPI test - apparently MPI uses specific flag values in
pointer constants. (eg: #define FOO (void*)~0)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166039 91177308-0d34-0410-b5e6-96231b3b80d8
ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.

We create an aligned temporary space and copy the content over from ap.cur to
the temporary space. This is necessary if the natural alignment of the type is
greater than the ABI alignment.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166040 91177308-0d34-0410-b5e6-96231b3b80d8
ARM ABI: passing illegal vector types as varargs.

We expand varargs in clang and the call site is handled in the back end, it is
hard to match exactly how illegal vectors are handled in the backend. Therefore,
we legalize the illegal vector types in clang:
if (Size <= 32), legalize to i32.
if (Size == 64), legalize to v2i32.
if (Size == 128), legalize to v4i32.
if (Size > 128), use indirect.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166043 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Ivar Invalidation: track ivars in continuations and
@implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166047 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Expose clang_version in CmpRuns

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166048 91177308-0d34-0410-b5e6-96231b3b80d8
ARM ABI: fix ABI alignment issues in varargs.

We generalize r166040 to handle ABI alignment issues for all types.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166052 91177308-0d34-0410-b5e6-96231b3b80d8
Note deleted functions when dumping vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166056 91177308-0d34-0410-b5e6-96231b3b80d8
Test pure virtual vtable entries in the Itanium ABI.

(original functionality committed in r99807, refactored in r160373)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166059 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Move some logic around to simplify the interface between the
front-end and the AsmParser.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166063 91177308-0d34-0410-b5e6-96231b3b80d8
XFAIL this testing case to recover buildbot

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166064 91177308-0d34-0410-b5e6-96231b3b80d8
Add pnaclcall convention to Native Client targets.

Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).

To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).

This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166066 91177308-0d34-0410-b5e6-96231b3b80d8
PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.

This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't
present in 4.4 - not sure when it got added, but you'll need something with
that function available for this to work).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166069 91177308-0d34-0410-b5e6-96231b3b80d8
DR1492: In a definition of a destructor, the exception specification must be
explicitly specified iff it was specified in the declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166071 91177308-0d34-0410-b5e6-96231b3b80d8
Serialize TargetOptions into an AST file, and make sure that we keep
target options around so they can be accessed at any point (rather
than keeping them transient).


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