]> granicus.if.org Git - clang/log
clang
9 years agoRemove many superfluous SmallString::str() calls.
Yaron Keren [Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)]
Remove many superfluous SmallString::str() calls.

Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.

There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.

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

9 years agoLex: Don't call getIdentifierInfo on annotation tokens
David Majnemer [Wed, 18 Mar 2015 07:53:20 +0000 (07:53 +0000)]
Lex: Don't call getIdentifierInfo on annotation tokens

These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot.  This would cause the included test to
crash clang.

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

9 years agoMS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate
David Majnemer [Wed, 18 Mar 2015 07:53:18 +0000 (07:53 +0000)]
MS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate

If we are in MSVC 2015 compatibility mode and C++11 language conformance
is enabled, define _HAS_CHAR16_T_LANGUAGE_SUPPORT to 1.

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

9 years agoMSVC Compat: Permit char16_t, char32_t and _Atomic when targeting > 2013
David Majnemer [Wed, 18 Mar 2015 04:15:23 +0000 (04:15 +0000)]
MSVC Compat: Permit char16_t, char32_t and _Atomic when targeting > 2013

We disabled support for _Atomic because the STL had name conflicts,
they've been resolved in 2015.  Similarly, reenable char16_t and
char32_t.

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

9 years ago[OPENMP] Fix crash on code emitting if errors are found.
Alexey Bataev [Wed, 18 Mar 2015 04:13:55 +0000 (04:13 +0000)]
[OPENMP] Fix crash on code emitting if errors are found.

Codegen for threadprivate variables (and in some other cases) may cause crash of the compiler if some diagnostic is produced later. This happens because some of the autogenerated globals are not removed from InternalVars StringMap when llvm::Module is reset.
Differential Revision: http://reviews.llvm.org/D8360

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

9 years agoMS ABI: Empty pack expansions had their mangling changed in 2013->2015
David Majnemer [Wed, 18 Mar 2015 03:56:27 +0000 (03:56 +0000)]
MS ABI: Empty pack expansions had their mangling changed in 2013->2015

We used to support the 2013 mangling and changed it to the more
reasonable 2015 mangling.  Let's make the mangling conditional on what
version of MSVC is targeted.

This fixes PR21888.

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

9 years agoMake module files passed to a module build via -fmodule-file= available to
Richard Smith [Wed, 18 Mar 2015 01:42:29 +0000 (01:42 +0000)]
Make module files passed to a module build via -fmodule-file= available to
consumers of that module.

Previously, such a file would only be available if the module happened to
actually import something from that module.

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

9 years agoFix test in release mode. This reapplies r232456, corresponding to r232579.
NAKAMURA Takumi [Wed, 18 Mar 2015 01:41:58 +0000 (01:41 +0000)]
Fix test in release mode. This reapplies r232456, corresponding to r232579.

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

9 years agoFix the LLVM type used when lowering initializer list reference temporaries to global...
Nick Lewycky [Wed, 18 Mar 2015 01:06:24 +0000 (01:06 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables. Reapplies r232454 with fix for PR22940.

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

9 years agoBasic: Update clang to reflect changes made to LLVM datalayout
David Majnemer [Tue, 17 Mar 2015 23:55:00 +0000 (23:55 +0000)]
Basic: Update clang to reflect changes made to LLVM datalayout

We now give x86-64 COFF targets a different mangling code, update clang
to use it.

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

9 years agoFix a crash when the size of an 'auto' is needed and its initalizer
Kaelyn Takata [Tue, 17 Mar 2015 23:50:12 +0000 (23:50 +0000)]
Fix a crash when the size of an 'auto' is needed and its initalizer
contained a typo correction (the auto decl was being marked as dependent
unnecessarily, which triggered an assertion in cases where the size of
the type is needed).

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

9 years agoMS ABI: Fix a couple of -Winconsistent-missing-override warnings
Justin Bogner [Tue, 17 Mar 2015 22:31:34 +0000 (22:31 +0000)]
MS ABI: Fix a couple of -Winconsistent-missing-override warnings

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

9 years agoImply linker arguments from '-fveclib' option.
Michael Zolotukhin [Tue, 17 Mar 2015 22:13:05 +0000 (22:13 +0000)]
Imply linker arguments from '-fveclib' option.

Summary: As discussed in D8097, we should provide corresponding linking flags when 'fveclib' is specified.

Reviewers: hfinkel

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

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

9 years agoMS ABI: Build C++ default argument exprs for exported template classes
Reid Kleckner [Tue, 17 Mar 2015 21:51:43 +0000 (21:51 +0000)]
MS ABI: Build C++ default argument exprs for exported template classes

This was an omission from r232229.

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

9 years agoMS ABI: Emit HandlerMap entries for C++ catch
David Majnemer [Tue, 17 Mar 2015 20:35:05 +0000 (20:35 +0000)]
MS ABI: Emit HandlerMap entries for C++ catch

The HandlerMap describes, to the runtime, what sort of catches surround
the try.  In principle, this structure has to be emitted by the backend
because only it knows the layout of the stack (the runtime needs to know
where on the stack the destination of a copy lives, etc.) but there is
some C++ specific information that the backend can't reason about.

Stick this information in special LLVM globals with the relevant
"const", "volatile", "reference" info mangled into the name.

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

9 years agoWIP
David Majnemer [Tue, 17 Mar 2015 20:35:00 +0000 (20:35 +0000)]
WIP

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

9 years agoAdd fveclib option.
Michael Zolotukhin [Tue, 17 Mar 2015 20:03:11 +0000 (20:03 +0000)]
Add fveclib option.

Review: http://reviews.llvm.org/D8097

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

9 years agoMS ABI: Delay default constructor closure checking until the outermost class scope...
Reid Kleckner [Tue, 17 Mar 2015 19:00:50 +0000 (19:00 +0000)]
MS ABI: Delay default constructor closure checking until the outermost class scope ends

Previously, we would error out on this code because the default argument
wasn't parsed until the end of Outer:

  struct __declspec(dllexport) Outer {
    struct __declspec(dllexport) Inner {
      Inner(void *p = 0);
    };
  };

Now we do the checking on the closing brace of Outer instead of Inner.

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

9 years agoComment parsing: move a diagnostic to the correct group.
Dmitri Gribenko [Tue, 17 Mar 2015 18:03:42 +0000 (18:03 +0000)]
Comment parsing: move a diagnostic to the correct group.

Based on a patch by LE GARREC Vincent.

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

9 years agoRevert r232454 and r232456: "Fix the LLVM type used when lowering initializer list...
Hans Wennborg [Tue, 17 Mar 2015 16:38:58 +0000 (16:38 +0000)]
Revert r232454 and r232456: "Fix the LLVM type used when lowering initializer list reference temporaries to global variables."

This caused PR22940.

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

9 years ago[ARM] Add support for ARMV6K subtarget (Clang)
Renato Golin [Tue, 17 Mar 2015 11:55:43 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (Clang)

ARMv6K is another layer between ARMV6 and ARMV6T2. This is the Clang
side of the changes.

ARMV6 family LLVM implementation.

+-------------------------------------+
| ARMV6                               |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+    have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2)          |    (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+    be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2)            |    The two processors also use
+-------------------------------------+    different encoding for them.

Patch by Vinicius Tinti.

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

9 years agoTeach Twine to support SmallString.
Yaron Keren [Tue, 17 Mar 2015 09:51:17 +0000 (09:51 +0000)]
Teach Twine to support SmallString.

Enable removing .str() member calls for these frequent cases.

 http://reviews.llvm.org/D6372

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

9 years agoFix test in release mode.
Nick Lewycky [Tue, 17 Mar 2015 02:31:46 +0000 (02:31 +0000)]
Fix test in release mode.

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

9 years ago[modules] Fix bug where an anonymous namespace could cause the containing
Richard Smith [Tue, 17 Mar 2015 02:23:11 +0000 (02:23 +0000)]
[modules] Fix bug where an anonymous namespace could cause the containing
namespace to not merge properly.

We have an invariant here: after a declaration reads its canonical declaration,
it can assume the canonical declaration is fully merged. This invariant can be
violated if deserializing some declaration triggers the deserialization of a
later declaration, because that later declaration can in turn deserialize a
redeclaration of that first declaration before it is fully merged.

The anonymous namespace for a namespace gets stored with the first declaration
of that namespace, which may be before its parent namespace, so defer loading
it until after we've finished merging the surrounding namespace.

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

9 years agoFix the LLVM type used when lowering initializer list reference temporaries to global...
Nick Lewycky [Tue, 17 Mar 2015 02:21:31 +0000 (02:21 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables.

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

9 years agoCodeGenCXX: Test that linetables work with variadic virtual thunks
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 01:19:01 +0000 (01:19 +0000)]
CodeGenCXX: Test that linetables work with variadic virtual thunks

Add a frontend test for PR22929, which was fixed by LLVM r232449.
Besides the crash test, check that the `!dbg` attachment is sane since
its presence was the trigger.

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

9 years agoFix typo in previous commit
Justin Bogner [Tue, 17 Mar 2015 00:04:57 +0000 (00:04 +0000)]
Fix typo in previous commit

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

9 years agoGCOV: Expose the -coverage-exit-block-before-body flag in clang -cc1
Justin Bogner [Mon, 16 Mar 2015 23:52:21 +0000 (23:52 +0000)]
GCOV: Expose the -coverage-exit-block-before-body flag in clang -cc1

This exposes the optional exit block placement logic from r232438 as a
clang -cc1 option. There is a test on the llvm side, but there isn't
really a way to inspect the gcov options from clang to test it here as
well.

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

9 years agoUpdate for llvm API change.
Rafael Espindola [Mon, 16 Mar 2015 22:30:13 +0000 (22:30 +0000)]
Update for llvm API change.

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

9 years agoTake the non-reference type when constructing a dummy expression.
Richard Trieu [Mon, 16 Mar 2015 21:49:43 +0000 (21:49 +0000)]
Take the non-reference type when constructing a dummy expression.

Otherwise, Expr will assert during construction with a reference type.

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

9 years ago[modules] If we find more formerly-canonical declarations of an entity while
Richard Smith [Mon, 16 Mar 2015 20:54:07 +0000 (20:54 +0000)]
[modules] If we find more formerly-canonical declarations of an entity while
building its redecl chains, make sure we pull in the redeclarations of those
canonical declarations.

It's pretty difficult to reach a situation where we can find more canonical
declarations of an entity while building its redecl chains; I think the
provided testcase (4 modules and 7 declarations) cannot be reduced further.

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

9 years agoLambdaify some helper functions. No functionality change.
Richard Smith [Mon, 16 Mar 2015 20:11:03 +0000 (20:11 +0000)]
Lambdaify some helper functions. No functionality change.

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

9 years agoGlobal inline assembler blocks are merged before parsing, so no specific
Joerg Sonnenberger [Mon, 16 Mar 2015 17:54:54 +0000 (17:54 +0000)]
Global inline assembler blocks are merged before parsing, so no specific
location data is available. If pragma handling wants to look up the
position, it finds the LLVM buffer and wants to compare it with the
special built-in buffer, failing badly. Extend to the special handling
of the built-in buffer to also check for the inline asm buffer. Expect
only a single asm buffer. Sort it between the built-in buffers and the
normal file buffers.

Fixes the assert part of PR 22576.

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

9 years ago[clang] Replacing asserts with static_asserts where appropriate
Gabor Horvath [Mon, 16 Mar 2015 09:59:54 +0000 (09:59 +0000)]
[clang] Replacing asserts with static_asserts where appropriate

Summary: This patch consists of the suggestions of clang-tidy/misc-static-assert check.

Reviewers: alexfh

Subscribers: dblaikie, xazax.hun, cfe-commits

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

Patch by Szabolcs Sipos!

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

9 years ago[OPENMP] Enable codegen of the ‘private’ clause for ‘omp simd’ directive
Alexander Musman [Mon, 16 Mar 2015 07:14:41 +0000 (07:14 +0000)]
[OPENMP] Enable codegen of the ‘private’ clause for ‘omp simd’ directive

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

9 years agoSimpleArray: Provide reverse iteration via std::reverse_iterator.
Benjamin Kramer [Sun, 15 Mar 2015 18:47:26 +0000 (18:47 +0000)]
SimpleArray: Provide reverse iteration via std::reverse_iterator.

NFC intended.

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

9 years agoImplement PreprocessingRecord's and LazyVector's iterators on top of iterator_adaptor...
Benjamin Kramer [Sun, 15 Mar 2015 15:27:19 +0000 (15:27 +0000)]
Implement PreprocessingRecord's and LazyVector's iterators on top of iterator_adaptor_base

This basically creates a wrapper around an 'int' that poses as an iterator.
While that looks a bit counter-intuitive it works just fine because iterator
operations and basic integer arithmetic works in exactly the same way.

Remove the manual integer wrapping code and reduce the reliance on iterator
internals in the implementation. No functionality change intended.

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

9 years agoclang-format: [JS] support cast syntax and type arguments.
Daniel Jasper [Sun, 15 Mar 2015 13:59:51 +0000 (13:59 +0000)]
clang-format: [JS] support cast syntax and type arguments.

Casts in TS syntax (foo = <type>bar;) should not be followed by
whitespace.

Patch by Martin Probst. Thank you.

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

9 years agoclang-format: [JS] more precisely detect enums.
Daniel Jasper [Sun, 15 Mar 2015 13:55:54 +0000 (13:55 +0000)]
clang-format: [JS] more precisely detect enums.

The current enum detection is overly aggressive. As NestingLevel only
applies per line (?) it classifies many if not most object literals as
enum declarations and adds superfluous line breaks into them. This
change narrows the heuristic by requiring an assignment just before the
open brace and requiring the line to start with an identifier.

Patch by Martin Probst. Thank you.

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

9 years agoMS ABI: Don't use qualified pointee types for 'catch' EH TypeDescriptors
David Majnemer [Sun, 15 Mar 2015 07:10:01 +0000 (07:10 +0000)]
MS ABI: Don't use qualified pointee types for 'catch' EH TypeDescriptors

Qualifiers are located next to the TypeDescriptor in order to properly
ensure that a pointer type can only be caught by a more qualified catch
handler.  This means that a catch handler of type 'const int *' requires
an RTTI object for 'int *'.  We got this correct for 'throw' but not for
'catch'.

N.B.  We don't currently have the means to store the qualifiers because
LLVM's EH strategy is tailored to the Itanium scheme.  The Itanium ABI
stores qualifiers inside the type descriptor in such a way that the
manner of qualification is stored in addition to the pointee type's
descriptor.  Perhaps the best way of modeling this for the MS ABI is
using an aggregate type to bundle the qualifiers with the descriptor?
This is tricky because we want to make it clear to the optimization
passes which catch handlers invalidate other handlers.

My current thoughts on a design for this is along the lines of:
  { { TypeDescriptor* TD, i32 QualifierFlags }, i32 MiscFlags }

The idea is that the inner most aggregate is all that is needed to
communicate that one catch handler might supercede another.  The
'MiscFlags' field would be used to hold the bitpattern for the notion
that the 'catch' handler does not need to invoke a copy-constructor
because we are catching by reference.

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

9 years ago-Wempty-body: fix false negative triggered by macros
Dmitri Gribenko [Sun, 15 Mar 2015 01:08:23 +0000 (01:08 +0000)]
-Wempty-body: fix false negative triggered by macros

When if statement condition ended in a macro:

    if (ptr == NULL);

the check used to consider the definition location of NULL, instead of the
current line.

Patch by Manasij Mukherjee.

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

9 years agoMS ABI: Tidy up references to the ASTContext
David Majnemer [Sat, 14 Mar 2015 23:44:48 +0000 (23:44 +0000)]
MS ABI: Tidy up references to the ASTContext

CGCXXABI has a handy getContext() method.  Use that instead of
explicitly going through the CodeGenModule.

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

9 years agoCodeGen: Correctly initialize bitfields with non-constant initializers
David Majnemer [Sat, 14 Mar 2015 22:24:38 +0000 (22:24 +0000)]
CodeGen: Correctly initialize bitfields with non-constant initializers

It is possible to construct an initializer for a bitfield which is not
constant.  Instead of emitting code to initialize the field before the
execution of main, clang would crash.

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

9 years agoSort ObjCProtocolDecls with array_pod_sort.
Benjamin Kramer [Sat, 14 Mar 2015 13:32:49 +0000 (13:32 +0000)]
Sort ObjCProtocolDecls with array_pod_sort.

The predicate is essentially a string comparison. NFC.

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

9 years ago[analyzer] Sort path diagnostics with array_pod_sort.
Benjamin Kramer [Sat, 14 Mar 2015 12:39:22 +0000 (12:39 +0000)]
[analyzer] Sort path diagnostics with array_pod_sort.

They're expensive to compare and we won't sort many of them so std::sort
doesn't give any benefits and causes code bloat. Func fact: clang -O3 didn't
even bother to inline libc++'s std::sort here.

While there validate the predicate a bit harder, the sort is unstable and we
don't want to introduce any non-determinism. I had to spell out the function
pointer type because GCC 4.7 still fails to convert the lambda to a function
pointer :(

No intended functionality change.

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

9 years agoMS ABI: Mangle virtual member pointer thunks with the correct CC
David Majnemer [Sat, 14 Mar 2015 06:34:41 +0000 (06:34 +0000)]
MS ABI: Mangle virtual member pointer thunks with the correct CC

Virtual member pointers are implemented using a thunk.  We assumed that
the calling convention for this thunk was always __thiscall for 32-bit
targets and __cdecl for 64-bit targets.  However, this is not the case.
Mangle in whichever calling convention is appropriate for this member
function thunk.

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

9 years ago[modules] Teach the AST reader to handle the case of importing a module
Chandler Carruth [Sat, 14 Mar 2015 04:47:43 +0000 (04:47 +0000)]
[modules] Teach the AST reader to handle the case of importing a module
with a subset of the existing target CPU features or mismatched CPU
names.

While we can't check that the CPU name used to build the module will end
up being able to codegen correctly for the translation unit, we actually
check that the imported features are a subset of the existing features.

While here, rewrite the code to use std::set_difference and have it
diagnose all of the differences found.

Test case added which walks the set relationships and ensures we
diagnose all the right cases and accept the others.

No functional change for implicit modules here, just better diagnostics.

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

9 years agoImplement bad cast checks using control flow integrity information.
Peter Collingbourne [Sat, 14 Mar 2015 02:42:25 +0000 (02:42 +0000)]
Implement bad cast checks using control flow integrity information.

This scheme checks that pointer and lvalue casts are made to an object of
the correct dynamic type; that is, the dynamic type of the object must be
a derived class of the pointee type of the cast. The checks are currently
only introduced where the class being casted to is a polymorphic class.

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

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

9 years agoAdd a bunch of missing "CHECK" colons in tests. NFC.
Ahmed Bougacha [Sat, 14 Mar 2015 01:10:19 +0000 (01:10 +0000)]
Add a bunch of missing "CHECK" colons in tests.  NFC.

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

9 years agoMS ABI: Generate default constructor closures
David Majnemer [Fri, 13 Mar 2015 22:36:55 +0000 (22:36 +0000)]
MS ABI: Generate default constructor closures

The MS ABI utilizes a compiler generated function called the "vector
constructor iterator" to construct arrays of objects with
non-trivial constructors/destructors.  For this to work, the constructor
must follow a specific calling convention.  A thunk must be created if
the default constructor has default arguments, is variadic or is
otherwise incompatible.  This thunk is called the default constructor
closure.

N.B.  Default constructor closures are only generated if the default
constructor is exported because clang itself does not utilize vector
constructor iterators.  Failing to export the default constructor
closure will result in link/load failure if a translation unit compiled
with MSVC is on the import side.

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

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

9 years agoMake tests more robust. No functional change.
Robert Lougher [Fri, 13 Mar 2015 20:35:45 +0000 (20:35 +0000)]
Make tests more robust. No functional change.

In preparation for recommit of revision 232190, change tests so that they
are resilient to operands being commuted by the reassociate pass.

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

9 years agoMS ABI: Implement __GetExceptionInfo for std::make_exception_ptr
David Majnemer [Fri, 13 Mar 2015 18:26:17 +0000 (18:26 +0000)]
MS ABI: Implement __GetExceptionInfo for std::make_exception_ptr

std::make_exception_ptr calls std::__GetExceptionInfo in order to figure
out how to properly copy the exception object.

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

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

9 years agoTest case updates for explicit type parameter to the gep operator
David Blaikie [Fri, 13 Mar 2015 18:21:46 +0000 (18:21 +0000)]
Test case updates for explicit type parameter to the gep operator

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

9 years agoUpdate test case to make it easier to automatically port to typeless pointer gep...
David Blaikie [Fri, 13 Mar 2015 18:21:11 +0000 (18:21 +0000)]
Update test case to make it easier to automatically port to typeless pointer gep operator changes coming soon

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

9 years agoSema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map
Benjamin Kramer [Fri, 13 Mar 2015 16:10:42 +0000 (16:10 +0000)]
Sema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map

This guarantees the order and doesn't increase malloc counts a lot as there are
typically very few elements int the map. Provide a little iterator adapter to
keep the same interface as we had with the flat sorted list.

No functional change intended.

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

9 years agoWhen building a module, all headers of submodules can be used.
Daniel Jasper [Fri, 13 Mar 2015 14:29:39 +0000 (14:29 +0000)]
When building a module, all headers of submodules can be used.

This extends r232159.

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

9 years agoclang-format: Don't corrupt macros with open braces.
Daniel Jasper [Fri, 13 Mar 2015 13:32:11 +0000 (13:32 +0000)]
clang-format: Don't corrupt macros with open braces.

Formatting:
  #define A { {
  #define B } }

Before:
  #define A               \
    {                     \
      { #define B }       \
    }

After:
  #define A               \
    {                     \
      {
  #define B               \
    }                     \
    }

This fixes llvm.org/PR22884.

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

9 years ago[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Alexey Bataev [Fri, 13 Mar 2015 12:27:31 +0000 (12:27 +0000)]
[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Adds additional semantic analysis + generation of helper expressions for proper codegen.

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

9 years agoMake a module "use" also count as use of all its submodules
Daniel Jasper [Fri, 13 Mar 2015 11:26:16 +0000 (11:26 +0000)]
Make a module "use" also count as use of all its submodules

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

9 years ago[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.
Alexander Musman [Fri, 13 Mar 2015 10:38:23 +0000 (10:38 +0000)]
[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.

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

9 years ago[Modules] Teach Clang to survive ambiguous macros which come from system
Chandler Carruth [Fri, 13 Mar 2015 08:29:54 +0000 (08:29 +0000)]
[Modules] Teach Clang to survive ambiguous macros which come from system
headers even if they arrived when merging non-system modules.

The idea of this code is that we don't want to warn the user about
macros defined multiple times by their system headers with slightly
different definitions. We should have this behavior if either the
macro comes from a system module, or the definition within the module
comes from a system header. Previously, we would warn on ambiguous
macros being merged when they came from a users modules even though they
only showed up via system headers.

By surviving this we can handle common system header macro differences
like differing 'const' qualification of pointers due to some headers
predating 'const' being valid in C code, even when those systems headers
are pre-built into a system module.

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

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

9 years ago[libclang] Fix crash when code-completing inside constructor initializer for a builti...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 07:39:30 +0000 (07:39 +0000)]
[libclang] Fix crash when code-completing inside constructor initializer for a builtin type.

rdar://20149746

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

9 years ago[libclang] During member ref expression visitation, ignore base anonymous struct...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 04:40:07 +0000 (04:40 +0000)]
[libclang] During member ref expression visitation, ignore base anonymous struct/union fields.

Otherwise they will shadow the real field that that we are interested in.

rdar://19783938

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

9 years agoDeduplicate #undef directives imported from multiple modules.
Richard Smith [Fri, 13 Mar 2015 04:05:01 +0000 (04:05 +0000)]
Deduplicate #undef directives imported from multiple modules.

No functionality change, but deeply-importing module files are smaller and
faster now.

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

9 years agoSimplify.
Joerg Sonnenberger [Fri, 13 Mar 2015 00:54:30 +0000 (00:54 +0000)]
Simplify.

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

9 years ago[CMake] Add clangBasic in ASTMatchersTests, according to r232051.
NAKAMURA Takumi [Thu, 12 Mar 2015 23:49:06 +0000 (23:49 +0000)]
[CMake] Add clangBasic in ASTMatchersTests, according to r232051.

Jan Vesely noticed it. See also r232055.

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

9 years agoDisambiguate call for GCC.
Benjamin Kramer [Thu, 12 Mar 2015 23:46:55 +0000 (23:46 +0000)]
Disambiguate call for GCC.

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

9 years agoCodeGen: Base the conditional cleanup machinery on variadic templates
Benjamin Kramer [Thu, 12 Mar 2015 23:41:40 +0000 (23:41 +0000)]
CodeGen: Base the conditional cleanup machinery on variadic templates

This is complicated by the fact that we can't simply use side-effecting
calls in an argument list without losing all guarantees about the order
they're emitted. To keep things deterministic we use tuples and brace
initialization, which thankfully guarantees evaluation order.

No functionality change intended.

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

9 years agoclang-format: [OBJC] Don't indent 8 spaces in method declarations.
Daniel Jasper [Thu, 12 Mar 2015 22:13:45 +0000 (22:13 +0000)]
clang-format: [OBJC] Don't indent 8 spaces in method declarations.

Before:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
          (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

After:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
      (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

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

9 years ago[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 21:54:24 +0000 (21:54 +0000)]
[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles

This is nearly identical to the v*f128_si256 parts of r231792 and r232052.

AVX2 introduced proper integer variants of the hacked integer insert/extract
C intrinsics that were created for this same functionality with AVX1.

This should complete the front end fixes for insert/extract128 intrinsics.
Corresponding LLVM patch to follow.

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

9 years agoSema: Make BoundTypeDiagnoser a variadic template
Benjamin Kramer [Thu, 12 Mar 2015 20:58:06 +0000 (20:58 +0000)]
Sema: Make BoundTypeDiagnoser a variadic template

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

9 years agoFix grammar in a comment, wrap to 80 columns. No behavior change.
Nico Weber [Thu, 12 Mar 2015 19:37:10 +0000 (19:37 +0000)]
Fix grammar in a comment, wrap to 80 columns. No behavior change.

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

9 years agoRemove duplicate "the". N+1 redundancy is not useful here.
Nico Weber [Thu, 12 Mar 2015 19:35:34 +0000 (19:35 +0000)]
Remove duplicate "the". N+1 redundancy is not useful here.

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

9 years agoMS ABI: Allow a nullptr_t exception to be caught by void * catch handler
David Majnemer [Thu, 12 Mar 2015 17:44:49 +0000 (17:44 +0000)]
MS ABI: Allow a nullptr_t exception to be caught by void * catch handler

A nullptr exception object can be caught by any pointer type catch
handler.  However, it is not possible to express this in the exception
info for the MS ABI.  As a middle ground, allow such exception objects
to be caught with pointer-to-void catch handlers.

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

9 years ago[docs] Update the doxygen configuration file.
Logan Chien [Thu, 12 Mar 2015 17:27:53 +0000 (17:27 +0000)]
[docs] Update the doxygen configuration file.

Update the doxygen configuration file and the Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)

This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.

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

9 years ago[docs] Replace the doxygen qch option properly.
Logan Chien [Thu, 12 Mar 2015 17:27:19 +0000 (17:27 +0000)]
[docs] Replace the doxygen qch option properly.

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

9 years agoReplace second (hopefully unused) access of macro input argument with zero vector...
Sanjay Patel [Thu, 12 Mar 2015 17:23:46 +0000 (17:23 +0000)]
Replace second (hopefully unused) access of macro input argument with zero vector to be safer.

Suggested by Craig Topper in D8275.

This is a follow-on to r232052.

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

9 years agoASTMatchers: Add an explicit dependency on libclangBasic.
Benjamin Kramer [Thu, 12 Mar 2015 16:25:19 +0000 (16:25 +0000)]
ASTMatchers: Add an explicit dependency on libclangBasic.

In a static build the dependency is picked up implictly, but not in a shared
library build. This is needed for the new ObjC matchers that reference Selector.

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

9 years ago[X86, AVX] replace vextractf128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 15:50:36 +0000 (15:50 +0000)]
[X86, AVX] replace vextractf128 intrinsics with generic shuffles

This is very much like D8088 (checked in at r231792).

Now that we've replaced the vinsertf128 intrinsics,
do the same for their extract twins.

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

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

9 years agoAdd support for a few Objective-C matchers.
Manuel Klimek [Thu, 12 Mar 2015 15:48:15 +0000 (15:48 +0000)]
Add support for a few Objective-C matchers.

Add some matchers for Objective-C selectors and messages to
ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with
".m" extension in addition to ".cpp".  New tests added to
ASTMatchersTest.c.

Patch by Dean Sutherland.

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

9 years agoclang-format: When putting */& next to types, also wrap before them.
Daniel Jasper [Thu, 12 Mar 2015 15:04:53 +0000 (15:04 +0000)]
clang-format: When putting */& next to types, also wrap before them.

Before:
  LoooooooooooongType *
      loooooooooooongVariable;

After:
  LoooooooooooongType
      *loooooooooooongVariable;

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

9 years agoclang-format: [Java] Support anonymous classes after = and return.
Daniel Jasper [Thu, 12 Mar 2015 14:44:29 +0000 (14:44 +0000)]
clang-format: [Java] Support anonymous classes after = and return.

Before:
  A a = new A(){public String toString(){return "NotReallyA";
  }
  }
  ;

After:
  A a = return new A() {
    public String toString() {
      return "NotReallyA";
    }
  };

This fixes llvm.org/PR22878.

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

9 years agoSema: Don't emit a missing prototype warning for deleted functions.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)]
Sema: Don't emit a missing prototype warning for deleted functions.

This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

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

9 years agoUse Sema's PrintingPolicy when diagnosing DeclSpecs.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)]
Use Sema's PrintingPolicy when diagnosing DeclSpecs.

Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

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

9 years agoReverting r232034, as it broke one of the bots with link errors. Details at: http...
Aaron Ballman [Thu, 12 Mar 2015 14:14:48 +0000 (14:14 +0000)]
Reverting r232034, as it broke one of the bots with link errors. Details at: http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio

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

9 years agoInstead of dereferencing std::vector::end() (which is UB and causes failed assertions...
Aaron Ballman [Thu, 12 Mar 2015 13:49:45 +0000 (13:49 +0000)]
Instead of dereferencing std::vector::end() (which is UB and causes failed assertions in debug builds with Visual Studio), use data() + size() to calculate the end iterator. Amends r231952.

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

9 years ago[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Alexander Musman [Thu, 12 Mar 2015 13:37:50 +0000 (13:37 +0000)]
[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Differential Revision: http://reviews.llvm.org/D7138

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

9 years agoAdded some matchers for objective c selectors and messages to ASTMatchers.h. Minor...
Aaron Ballman [Thu, 12 Mar 2015 13:21:19 +0000 (13:21 +0000)]
Added some matchers for objective c selectors and messages to ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.

Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710

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

9 years ago[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
Alexey Bataev [Thu, 12 Mar 2015 08:53:29 +0000 (08:53 +0000)]
[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
If only one section is found in the sections region, it is emitted just like single region.
Otherwise it is emitted as a static non-chunked loop.

#pragma omp sections
{
#pragma omp section
  {1}
  ...
  #pragma omp section
  {n}
}
is translated to something like

i32 <iter_var>
i32 <last_iter> = 0
i32 <lower_bound> = 0
i32 <upper_bound> = n-1
i32 <stride> = 1
call void @__kmpc_for_static_init_4(<loc>, i32 <gtid>, i32 34/*static non-chunked*/, i32* <last_iter>, i32* <lower_bound>, i32* <upper_bound>, i32* <stride>, i32 1/*increment always 1*/, i32 1/*chunk always 1*/)
<upper_bound> = min(<upper_bound>, n-1)
<iter_var> = <lb>
check:
br <iter_var> <= <upper_bound>, label cont, label exit
continue:
switch (IV) {
  case 0:
  {1};
  break;
  ...
  case <NumSection> - 1:
  {n};
  break;
  }
  ++<iter_var>
  br label check
  exit:
  call void @__kmpc_for_static_fini(<loc>, i32 <gtid>)
Differential Revision: http://reviews.llvm.org/D8244

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

9 years agoUpdate copyright year to 2015.
Tanya Lattner [Thu, 12 Mar 2015 01:36:10 +0000 (01:36 +0000)]
Update copyright year to 2015.

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

9 years agoDriver: Keep -isysroot flags in crash scripts if we're dumping a VFS
Justin Bogner [Thu, 12 Mar 2015 00:52:56 +0000 (00:52 +0000)]
Driver: Keep -isysroot flags in crash scripts if we're dumping a VFS

For crashes with a VFS (ie, with modules), the -isysroot flag is often
necessary to reproduce the crash. This is especially true if some
modules need to be rebuilt, since without the sysroot they'll try to
read headers that are outside of the VFS.

I find it likely that we should keep some of the other -i flags in
this case as well, but I haven't seen that come up in practice yet so
it seems better to be conservative.

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

9 years agodocs: Document byte arrays.
Peter Collingbourne [Thu, 12 Mar 2015 00:30:41 +0000 (00:30 +0000)]
docs: Document byte arrays.

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

9 years agoDriver: Print the clang version and original command in crash scripts
Justin Bogner [Thu, 12 Mar 2015 00:14:35 +0000 (00:14 +0000)]
Driver: Print the clang version and original command in crash scripts

When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.

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

9 years agoUnder duress, move check for target support of __builtin_setjmp/
Joerg Sonnenberger [Wed, 11 Mar 2015 23:46:32 +0000 (23:46 +0000)]
Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.

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

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

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

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

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

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

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

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

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

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

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

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

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