[ASan] If the iOS Simulator SDK is available, build the ASan iossim runtime using configure+make.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194816 91177308-0d34-0410-b5e6-96231b3b80d8
Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2152

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194817 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194820 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fix darwin-sanitizer-ld.c for iossim, which seems to use -lc++ instead of -lstdc++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194822 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Emit thunks for pointers to virtual member functions

Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.

This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.

Differential Revision: http://llvm-reviews.chandlerc.com/D2104

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194829 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC. Fixes a bogus warning of unused backing
ivar when property belongs to a super class and
currnt class happens to have a method with same name as
property. // rdar//15473432


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194830 91177308-0d34-0410-b5e6-96231b3b80d8
libc++: Install headers in include/, rather than lib/

When using the configure build system, the libc++ headers were being
installed in lib/, whereas cmake installs them in include/. Since
include/ makes more sense for headers, we'll make both systems install
headers there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194833 91177308-0d34-0410-b5e6-96231b3b80d8
Darwin: Look for libc++ headers in include/, rather than lib/

Up until now we were expecting that when libc++ is installed alongside
clang the headers would be in lib/, which was true if the configure
build was used and false if the cmake build was.

We've now corrected the configure build to install in include/, and
with this change we'll be able to find the correct headers with both
build systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194834 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an unused local from r194827

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194835 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Make the driver parse all(?) msvc flags

Even if we don't support a flag, we should be able to parse it
to provide a better error message than the current default
"error: no such file or directory: '/foo'" (which we should probably
also tweak, btw).

This also tries to clean up the test file a bit.

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