Commit Graph

21830 Commits

Author SHA1 Message Date
James Molloy 3a9a023eb6 [ARM64] Enable more CodeGen tests for ARM64. The crypto and neon intrinsics tests needed changing slightly due to the naming differences between AArch64 and ARM64.
llvm-svn: 206964
2014-04-23 10:26:23 +00:00
James Molloy 8bdd24b1a9 [ARM64] Change inline assembly constraints to be more lax, to match the behaviour of Clang/AArch64 and GCC.
GCC allows sub-64bit values to use the 'r' register constraint.

llvm-svn: 206963
2014-04-23 10:26:19 +00:00
James Molloy a7a23c1cce [ARM64] Enable the test aarch64-type-sizes.c for ARM64 BE.
This completes the port of r203918 (cpirker "AArch64_be specific clang target settings") to ARM64.

llvm-svn: 206962
2014-04-23 10:26:12 +00:00
James Molloy 7f4ba53ef0 [ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs test for arm64_be.
This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64.

llvm-svn: 206961
2014-04-23 10:26:08 +00:00
David Majnemer e3785bb03e MS ABI: Implement mangling for ref-qualifiers on methods
Mangle ref-qualifiers like the Nov 2013 CTP.

This fixes PR19361.

llvm-svn: 206946
2014-04-23 05:16:56 +00:00
Justin Bogner 0cbb6d86c8 CodeGen: Unify handling guard variables in the Itanium C++ ABI
We previously treated ARM separately from the generic Itanium ABI for
initializing guard variables. This code duplication led to things like
the ARM path missing the memory barrier for threadsafe handling, and a
highly misleading comment about how we were (mis)using the generic ABI
for ARM64 when really it went through the ARM codepath.

This unifies the two code paths. Functionally, this changes the ARM
and ARM64 codepath to use one byte loads instead of 4 and 8,
respectively, and adds the missing atomic acquire to these loads.
Other architectures are unchanged.

llvm-svn: 206937
2014-04-23 01:50:10 +00:00
Reid Kleckner c85b9a5f54 Add missing test triples
llvm-svn: 206935
2014-04-23 00:57:34 +00:00
Reid Kleckner 9aff2ca27c Driver: Honor %INCLUDE% when built with MinGW
Users are expected to pass system includes through the INCLUDE
environment variable on Windows.  There's no reason to change behavior
based on the toolchain used to build Clang.

I didn't change the registry searching code because I'm not sure it
builds with mingw and I'm not set up to test it.

llvm-svn: 206934
2014-04-23 00:15:12 +00:00
Richard Smith 70ee92fa4d Add some missing checks for C++1y digit separators that don't in fact separate
digits. Turns out we have completely separate lexing codepaths for floating
point numbers depending on whether or not they start with a zero. Who knew...
=)

llvm-svn: 206932
2014-04-22 23:50:25 +00:00
Richard Smith 06ffb45ce4 PR18746: If a constexpr function has a dependent return type and no return
statements, don't diagnose; the return type might end up being 'void'.

Patch by Rahul Jain! Tiny tweaks by me.

llvm-svn: 206929
2014-04-22 23:14:23 +00:00
Justin Bogner f893a6551b Driver: Skip the -fmodules-cache-path argument in driver crash diags
The modules cache path shouldn't be included in crash reports, as it's
a system (or run) specific directory.

llvm-svn: 206922
2014-04-22 21:30:17 +00:00
Quentin Colombet 6a9cf2629a [Driver][ARM64] Add a testcase for r206227.
llvm-svn: 206914
2014-04-22 18:29:43 +00:00
Fariborz Jahanian 953d18a988 Objective-C ARC. Under ARC, addition of 'bridge' attribute
on CF type is not sufficient and bridge casting is
still required for proper ownership semantics.
// rdar://16650445

llvm-svn: 206910
2014-04-22 17:42:01 +00:00
Timur Iskhodzhanov 6b12850d27 Fix PR19487, PR19505 and PR19506 -- redundant vtordisp thunks when the final overrider is present in both a vbase and nvbase
Reviewed at http://reviews.llvm.org/D3449

llvm-svn: 206908
2014-04-22 17:32:02 +00:00
Alexander Musman 8dba66412b [OPENMP] parsing 'linear' clause (for directive 'omp simd')
Differential Revision: http://reviews.llvm.org/D3272

llvm-svn: 206891
2014-04-22 13:09:42 +00:00
Tim Northover 761aa37e3e ARM64: update NEON test to improved backend codegen
llvm-svn: 206890
2014-04-22 12:45:55 +00:00
Dmitri Gribenko 6db07e2ab7 Comment parsing: close a hole in CDATA escaping in XML output
llvm-svn: 206886
2014-04-22 12:34:52 +00:00
Dmitri Gribenko 93043620bc Comment parsing: in the generated XML file, mark HTML that is safe to pass
through to the output even if the input comment comes from an untrusted source

Attribute filtering is currently based on a blacklist, which right now includes
all event handler attributes (they contain JavaScipt code).  It should be
switched to a whitelist, but going over all of the HTML5 spec requires a
significant amount of time.

llvm-svn: 206882
2014-04-22 10:59:13 +00:00
NAKAMURA Takumi 1fce16934f Update clang/test/PCH/single-token-macro.c corresponding to r206791.
__stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32.

llvm-svn: 206870
2014-04-22 08:16:58 +00:00
Richard Smith e334c01773 Move the C++11 ExtWarn for converting a string literal to 'char*' out of
-Wc++11-compat-deprecated-writable-strings. It's neither a C++11 compatibility
warning nor a deprecated feature, it's just ill-formed.

In passing, add that warning to -Wdeprecated, where it belongs.

llvm-svn: 206833
2014-04-22 01:11:06 +00:00
Richard Trieu 393197a08e Move the warning of implicit cast of a floating point to an integer out of
-Wconversion and into it's own group, -Wfloating-point-conversion.

llvm-svn: 206832
2014-04-22 01:01:05 +00:00
Diego Novillo 9f23997732 Allow adding a value to a flag in diagnostics.
Summary:
This allows callers of Diags.Report() to append a value to the name of
the flag associated with the diagnostic. This is useful in cases like
the -Rpass flag, where we want the diagnostic to show the name of the
pass that matched the pattern. Instead of showing "... [-Rpass]", this
allows us to show "... [-Rpass=passname]".

Reviewers: rsmith

CC: cfe-commits

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

llvm-svn: 206826
2014-04-21 23:16:03 +00:00
Reid Kleckner 4760683b04 MinGW: Define __stdcall&co when -fms-extensions is disabled
This is for compatibility with GCC.

Reviewers: asl

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

llvm-svn: 206791
2014-04-21 20:58:00 +00:00
Timur Iskhodzhanov d60ae72c42 Split out the rest of MS ABI multiple inheritance tests
Intentionally duplicate base class definitions per test, so it's easier to copy tests while debugging failures.

llvm-svn: 206782
2014-04-21 20:23:34 +00:00
Fariborz Jahanian 29cdbc6319 Objective-C. Patch to allow use of dot syntax on class
objects to fund root class's instance methods.
// rdar://16650575

llvm-svn: 206781
2014-04-21 20:22:17 +00:00
Ben Langmuir 4898cde4e1 Allow submodule inferrences with a missing umbrella when the module is unavailable
If the module is unavailable because of a missing header, don't diagnose
a "module * {}" declaration for having a missing umbrella.

llvm-svn: 206776
2014-04-21 19:49:57 +00:00
Bob Wilson 373af73ad4 ARM64: Do not expand variadic HFA/HVA arguments with the Darwin ABI.
Unlike the standard AAPCS64 ABI, variadic arguments are always passed on the
stack with the Darwin ABI, and this was not being considered when deciding
whether to expand HFA/HVA arguments in a call. An HFA argument with a "float"
base type was being expanded into separate "float" arguments, each of which
was then extended to a double, resulting in a serious mismatch from what is
expected by the va_arg implementation. <rdar://problem/15777067>

llvm-svn: 206729
2014-04-21 01:23:39 +00:00
Alp Toker f424a597df Fix and restore the macro-multiline.c test
This test didn't work as intended and was ultimately disabled some years ago in
r169458.

Indeed it's not clear if the '\n' was ever passed through to the driver
correctly given that lit would insert '&& {' at the newline.

Test rewritten to use printf/xargs to insert '\n' in a more reliable manner and
to use FileCheck for verification.

llvm-svn: 206703
2014-04-19 21:40:58 +00:00
Alp Toker 07508405f4 Disallow driver use in more Sema tests
There are now only a handful of Sema tests remaining that use %clang in
SemaCXX, SemaObjC and SemaTemplate.

llvm-svn: 206688
2014-04-19 19:07:31 +00:00
Alp Toker 8ee5b01f34 Move ObjC Cocoa.h header test to Headers
This tests for broad compatibility with platform SDK headers using the clang
driver and so belongs alongside the other header ingtegration tests.

llvm-svn: 206687
2014-04-19 19:07:24 +00:00
Alp Toker 7591a05d14 Re-enable the C++11 modules integration test on OS X
XCode 5.1.1 has shipped with fixed SDK headers.

This reverts commit r200256.

Fixes PR18322.

llvm-svn: 206686
2014-04-19 19:07:19 +00:00
NAKAMURA Takumi f0c40f7952 clang/test/Index/pch-with-errors.c: Remove XFAIL added in r206294. It has been fixed since r206644.
llvm-svn: 206685
2014-04-19 16:49:22 +00:00
Richard Smith cd45dbc5f2 When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.
llvm-svn: 206680
2014-04-19 03:48:30 +00:00
Ben Langmuir 993055f860 Fix a hole with nested unavailable submodules from r206664
If a module doesn't meet a requirement, neither do its submodules. If we
don't propogate that, we might think it's an error to be missing a
header in one of those submodules.

llvm-svn: 206673
2014-04-18 23:51:00 +00:00
Ben Langmuir ec8c975214 Don't build modules with (submodules with) missing headers
Unless they are in submodules that aren't available anyway, due to
requirements not being met.  Also, mark children as unavailable when the
parent is.

llvm-svn: 206664
2014-04-18 22:07:31 +00:00
Timur Iskhodzhanov 675bf27ab7 Split out the no-thunk multiple inheritance tests
Also, intentionally duplicate base class definitions per test, so it's easier to copy tests while debugging failures

llvm-svn: 206614
2014-04-18 15:10:05 +00:00
Tim Northover 4dab69815c ARM64: make sure the caller is expected to extend in AAPCS.
This is one of those DarwinPCS differences. It'd been caught in
arguments, but not return values.

llvm-svn: 206594
2014-04-18 13:46:08 +00:00
Tim Northover 07f1624aa2 ARM64: make sure HFAs on the stack get properly aligned.
Another AAPCS bug, part of PR19432.

llvm-svn: 206580
2014-04-18 10:47:44 +00:00
Duncan P. N. Exon Smith 85e349fd2c BackendUtil: Pass through -mdisable-tail-calls
The frontend option -fno-optimize-sibling-calls resolves to -cc1's
-mdisable-tail-calls, which is passed to the TargetMachine in the
backend.  PassManagerBuilder was adding the -tailcallelim pass anyway.

Use a new DisableTailCalls option in PassManagerBuilder to disable tail
calls harder.

Requires the matching commit in LLVM that adds DisableTailCalls.

<rdar://problem/16050591>

llvm-svn: 206543
2014-04-18 01:05:25 +00:00
Justin Bogner 534f14abe7 test: Use llvm-profdata merge in Profile tests
In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.

No functional change.

llvm-svn: 206509
2014-04-17 22:49:06 +00:00
Reid Kleckner fd385407fa MS ABI: Don't append to vbtables that we shouldn't extend
This was probably a benign bug, since nobody would look at the vbtable
slots that we were filling in.

llvm-svn: 206508
2014-04-17 22:47:52 +00:00
Timur Iskhodzhanov ed11ae3d21 Follow-up to r206457 -- fix static adjustments for some subtle virtual inheritance cases
Reviewed at http://reviews.llvm.org/D3410

llvm-svn: 206504
2014-04-17 22:01:48 +00:00
Richard Smith b45a6f72b6 Add missing serialization code for one of the CXXRecordDecl definition flags.
llvm-svn: 206493
2014-04-17 20:33:01 +00:00
Matt Arsenault 10e3ef8d2d Bug 18567: Fix constantexpr pointer casts with address spaces.
Getting a pointer into a struct at a non-zero offset would try to
use the default address space.

llvm-svn: 206478
2014-04-17 17:45:37 +00:00
Keith Walker 8ff56f6080 Fix Profile:cxx-lambda.cpp test for targets that do not generate zeroext
Change an expected match to allow for the fact that some targets
may not generated the zeroext operation.

llvm-svn: 206467
2014-04-17 13:04:53 +00:00
James Molloy dc197ea30d [ARM64] Fix __clear_cache - ensure it is predefined.
llvm-svn: 206465
2014-04-17 12:51:42 +00:00
James Molloy 96061a6db1 [ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.
This covers all tests in tests/Driver and tests/Preprocessor, but there are some
failing tests in test/Sema that need looking into.

llvm-svn: 206464
2014-04-17 12:51:36 +00:00
James Molloy ec78aa46f2 [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
llvm-svn: 206463
2014-04-17 12:51:28 +00:00
James Molloy 2b24fc41fc [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.
llvm-svn: 206462
2014-04-17 12:51:23 +00:00
James Molloy 9b1586b6cc [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibility.
llvm-svn: 206461
2014-04-17 12:51:17 +00:00