Suppress -Wswitch to unbreak the build.

This may need to be fixed more intelligently - I don't have enough context to
be sure what the appropriate fix is right now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175902 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure pragmas don't attach visibility attributes to auto variables with
internal linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175903 91177308-0d34-0410-b5e6-96231b3b80d8
Replace some typically large vectors with SmallVector.

This may seem counter-intuitive but the POD-like optimization helps when the
vectors grow into multimegabyte buffers. SmallVector calls realloc which knows
how to twiddle virtual memory bits and avoids large copies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175906 91177308-0d34-0410-b5e6-96231b3b80d8
[preprocessing record] Have the MacroDefinitions map point to the MacroDefinition object instead
its index in the preprocessed entities vector.

This is because the order of the entities in the vector can change in some (uncommon) cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175907 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for coldcc to clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.

This Decl shouldn't be the canonical Decl; it should be the Decl used by
the CXXBaseSpecifier in the subclass. Unfortunately, that means continuing
to throw getCanonicalDecl() on all comparisons.

This fixes MemRegion::getAsOffset's use of ASTRecordLayout when redeclarations
are involved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175913 91177308-0d34-0410-b5e6-96231b3b80d8
Split out the command handling for split debug info, we're going
to want to propagate some information through the module into
the back end and so need to pass it through to codegen.

Also make the methods file static so we can use them in other places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175916 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure we apply attributes to correct places.

Some attributes make sense only on the function or on the call site, but not
both. Make this distinction here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175918 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Pass down the -march setting down to -cc1as on x86 too.

The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175919 91177308-0d34-0410-b5e6-96231b3b80d8
Update tests so that we don't test for function-only attributes on call sites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175921 91177308-0d34-0410-b5e6-96231b3b80d8
objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175923 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Fix assertion hit when code-completing inside a function macro with more
arguments than it should accept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175925 91177308-0d34-0410-b5e6-96231b3b80d8
Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175935 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r175912, "Add support for coldcc to clang" at John's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the hack that avoided mangling static functions in extern C contexts.

Weather we should give C language linkage to functions and variables with
internal linkage probably depends on how much code assumes it. The standard
says they should have no language linkage, but gcc and msvc assign them
C language linkage.

This commit removes the hack that was preventing the mangling on static
functions declare in extern C contexts. It is an experiment to see if we
can implement the rules in the standard.

If it turns out that many users depend on these functions and variables
having C language linkage, we should change isExternC instead and try
to convince the CWG to change the standard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175937 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
Test that attribute(availability) doesn't override private_extern.

rdar://12399248

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175943 91177308-0d34-0410-b5e6-96231b3b80d8
ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175949 91177308-0d34-0410-b5e6-96231b3b80d8
clang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175952 91177308-0d34-0410-b5e6-96231b3b80d8
Implement __builtin_eh_return_data_regno() for ARM and MIPS.


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