Use llvm::sys::path::native instead of llvm::sys::fs::normalize_separators.

llvm::sys::path::native has a superset of the functionality and this was the
only use of llvm::sys::fs::normalize_separators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215242 91177308-0d34-0410-b5e6-96231b3b80d8
Change __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.

The previous encoding only allowed a single digit for the minor version
number. This changes it to use 2 digits for both the minor version and the
revision number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215245 91177308-0d34-0410-b5e6-96231b3b80d8
Sure-up MemoryBuffer ownership in JSONCompilationDatabase's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215246 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C [qoi]. Issue warning and fixit if property-dot syntax
use mis-cased property name (which is currently accepted silently
due to the way property setters are named). rdar://17911746


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215250 91177308-0d34-0410-b5e6-96231b3b80d8
Extend tautological pointer compare and pointer to bool conversion warnings to
macro arguments.

Previously, these warnings skipped any code in a macro expansion.  Preform an
additional check and warn when the expression and context locations are both
in the macro argument.

The most obvious case not caught is passing a pointer directly to a macro,
i.e 'assert(&array)' but 'assert(&array && "valid array")' is caught.  This is
because macro arguments are not typed and the conversion happens inside the
macro.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215251 91177308-0d34-0410-b5e6-96231b3b80d8
Add -link-cxx-sanitizer driver flag.

Summary:
This flag can be used to force linking of CXX-specific parts
of sanitizer runtimes into the final executable. It gives more precise
control than --driver-mode=g++ and comes handy when user links several
object files with sanitized C++ code into an executable, but wants
to provide libstdc++ himself, instead of relying on Clang dirver's
behavior.

Test Plan: clang regression test suite

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215252 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection.

Summary: I was going to fix the use of raw pointer ownership in "takeGraph" when I realized that function was unused and the whole ExplodedGraph could just be owned by value without the std::unique_ptr indirection at all.

Reviewers: jordan_rose

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215257 91177308-0d34-0410-b5e6-96231b3b80d8
Add a cc1 "dump-coverage-mapping" for testing coverage mapping.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215258 91177308-0d34-0410-b5e6-96231b3b80d8
Predefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>

These macros are used as markers for Interface Builder and need to be defined
to empty strings since they have no impact on the code.

Patch by Ted Kremenek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215259 91177308-0d34-0410-b5e6-96231b3b80d8
Add predefined macros to identify x86_64h architectures.

Patch by Jim Grosbach.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215260 91177308-0d34-0410-b5e6-96231b3b80d8
Add tests for coverage mapping generation.

This patch adds the tests for the coverage mapping generation. 
Most of the tests check the mapping regions produced by 
the generator, and one checks the llvm IR.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215261 91177308-0d34-0410-b5e6-96231b3b80d8
Remove some transient raw pointer ownership in ClangAttrEmitter::createArgument

This function might be a bit easier if it were split in two with a lot
of early returns - and that setOptional bit in the outer function, but
anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215263 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor the module map file used for uniquing a module name out of

class Module. It's almost always going to be the same as
getContainingModule() for top-level modules, so just add a map to cover
the remaining cases.  This lets us do less bookkeeping to keep the
ModuleMap fields up to date.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215268 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Weaken an out-of-date assertion: an #undef can have no location if we
imported it from a module when performing finalization before writing out
an AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215272 91177308-0d34-0410-b5e6-96231b3b80d8
Revert a failing test from r215261

The (new) CoverageMapping/macroparams.c test is failing on a number of
buildbots. Reverting it until Alex can investigate and fix the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215274 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Add tests for coverage mapping generation."

I reverted one of the added tests from r215261 in r215274, since it
was failing on quite a few bots. It looks like this wasn't sufficient,
as we're still getting failures on windows, like the following:

    http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/5378

I'm reverting this entire commit so the bots aren't blocked on these
failures.

This reverts commit r215261.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215278 91177308-0d34-0410-b5e6-96231b3b80d8
Fix PR20479 -- missing vftable slots in case of virtual inheritance vs return adjusting thunks

Reviewed at http://reviews.llvm.org/D4829

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215285 91177308-0d34-0410-b5e6-96231b3b80d8
Fix six tests are failing on Windows after r215241-r215243.

    Clang :: Frontend/iframework.c
    Clang :: Frontend/system-header-prefix.c
    Clang :: Index/annotate-comments-objc.m
    Clang :: Index/annotate-module.m
    Clang :: Index/index-module.m
    Clang :: Index/index-pch-with-module.m
    Clang :: PCH/case-insensitive-include.c

Suprisingly the normalize_separators() was no-op when LLVM_ON_WIN32.
Its replacement native() does change path separators into \ as expected,
breaking these tests.

I had fixed the tests by #ifndef LLVM_ON_WIN32 on the native call,
to match the previous behaviour. 
If this logic is not used on Windows host, it might be completely
deleted as there should not be windows path seperators on Linux hosts.

I can't test on Linux but if someone can run tests on Linux after
commenting out the line

  llvm::sys::path::native(NormalizedPath);    

and the tests pass, the whole if (LangOpts.MSVCCompat) could be deleted.
  


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215290 91177308-0d34-0410-b5e6-96231b3b80d8
NetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215291 91177308-0d34-0410-b5e6-96231b3b80d8
Use the correct fallback directory for EABIHF targets on NetBSD/arm.
From Matt Thomas.


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