]> granicus.if.org Git - clang/log
clang
8 years agoTeach typo correction to properly handle mapping declarations to their
Richard Smith [Tue, 29 Dec 2015 19:43:10 +0000 (19:43 +0000)]
Teach typo correction to properly handle mapping declarations to their
underlying decls. Preserve the found declaration throughout, and only map to
the underlying declaration when we want to check whether it's the right kind.
This allows us to provide the right source location for the found declaration,
and prepares for the possibility of underlying decls with a different name
from the found decl.

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

8 years ago[TrailingObjects] Convert AST classes that had a ASTTemplateKWAndArgsInfo.
James Y Knight [Tue, 29 Dec 2015 18:15:14 +0000 (18:15 +0000)]
[TrailingObjects] Convert AST classes that had a ASTTemplateKWAndArgsInfo.

So, also:

- Moved the TemplateArgumentLoc array out of the
  ASTTemplateKWAndArgsInfo class (making it a simple fixed-size object),
  to avoid needing to have a variable-length object as part of a
  variable-length object. Now the objects that have a
  ASTTemplateKWAndArgsInfo also have some TemplateArgumentLoc objects
  appended directly.

- Removed some internal-use accessors which became simply a wrapper on
  getTrailingObjects.

- Moved MemberNameQualifier out of the MemberExpr class, renamed it
  MemberExprNameQualifier, because the template can't
  refer to a class nested within the class it's defining.

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

8 years ago[analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning...
Devin Coughlin [Tue, 29 Dec 2015 17:40:49 +0000 (17:40 +0000)]
[analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning nil.

The nullability checker currently allows casts to suppress warnings when a nil
literal is passed as an argument to a parameter annotated as _Nonnull:

  foo((NSString * _Nonnull)nil); // no-warning

It does so by suppressing the diagnostic when the *type* of the argument expression
is _Nonnull -- even when the symbolic value returned is known to be nil.

This commit updates the nullability checker to similarly honor such casts in the analogous
scenario when nil is returned from a function with a _Nonnull return type:

  return (NSString * _Nonnull)nil; // no-warning

This commit also normalizes variable naming between the parameter and return cases and
adds several tests demonstrating the limitations of this suppression mechanism (such as
when nil is cast to _Nonnull and then stored into a local variable without a nullability
qualifier). These tests are marked with FIXMEs.

rdar://problem/23176782

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

8 years ago[TrailingObjects] Use a different technique to determine if a getDecl
James Y Knight [Tue, 29 Dec 2015 16:44:11 +0000 (16:44 +0000)]
[TrailingObjects] Use a different technique to determine if a getDecl
member function exists on a class.

The previous trick depended on inheriting from the class it was
checking, which will fail when I start marking things 'final'.

Attempt #2: now with a special #ifdef branch for MSVC.

Hopefully *this* actually builds with all supported compilers...

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

8 years ago[MS ABI] Implement a mangling for _Atomic types
David Majnemer [Tue, 29 Dec 2015 11:46:00 +0000 (11:46 +0000)]
[MS ABI] Implement a mangling for _Atomic types

MSVC doesn't implement a mangling for C11's _Atomic so we must invent
our own.

For now, treating it like a class type called _Atomic in the __clang
namespace.

This means that 'void f(__Atomic(int))'
will demangle as: 'void f(struct __clang::_Atomic<int>)'

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

8 years ago[MS ABI] Cleanup our mangling of vector types
David Majnemer [Tue, 29 Dec 2015 11:45:58 +0000 (11:45 +0000)]
[MS ABI] Cleanup our mangling of vector types

We used to produce a type which demangled to:
union __clang_vec8_F

That 'F' is the mangling for 'short' but it is present in the mangled
name in an inappropriate place, leading to it not getting demangled.

Instead, create a synthetic class type in a synthetic namespace called
__clang. With this, it now demangles to:
union __clang::__vector<short,8>

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

8 years ago[MS ABI] Cleanup the mangling of artifical types
David Majnemer [Tue, 29 Dec 2015 11:45:53 +0000 (11:45 +0000)]
[MS ABI] Cleanup the mangling of artifical types

Hand-rolling the mangling results in us not correctly adding names to
the backreference map.

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

8 years agoclang-format: [JS/TypeScript] Support "enum" as property name.
Daniel Jasper [Tue, 29 Dec 2015 08:54:23 +0000 (08:54 +0000)]
clang-format: [JS/TypeScript] Support "enum" as property name.

Before:
  enum: string
  [];

After:
  enum: string[];

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

8 years ago[ms inline asm] Add support for label names with '$' chars
Marina Yatsina [Tue, 29 Dec 2015 08:49:34 +0000 (08:49 +0000)]
[ms inline asm] Add support for label names with '$' chars

In MS inline asm syntax a label with '$' char produces an error, while in AT&T it does not.
In AT&T inline asm syntax Clang escapes the '$' char and replaces it with "$$". Adopted same approach for MS syntax.

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

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

8 years agoRevert "[TrailingObjects] Use a different technique to determine if a getDecl"
James Y Knight [Tue, 29 Dec 2015 04:46:43 +0000 (04:46 +0000)]
Revert "[TrailingObjects] Use a different technique to determine if a getDecl"

This reverts commit r256534.

Failed to build on MSVC with error:
clang/ASTMatchers/ASTMatchersInternal.h(572): error C2228: left of '.getDecl' must have class/struct/union
        type is 'add_rvalue_reference<_Ty>::type'

(http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/13873/steps/build/logs/stdio)

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

8 years ago[TrailingObjects] Use a different technique to determine if a getDecl
James Y Knight [Tue, 29 Dec 2015 04:34:11 +0000 (04:34 +0000)]
[TrailingObjects] Use a different technique to determine if a getDecl
member function exists on a class.

The previous trick depended on inheriting from the class it was
checking, which will fail when I start marking things 'final'.

Hopefully this actually builds with all supported compilers...

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

8 years agoRevert r93378, which is incorrect but currently unobservable (because the
Richard Smith [Tue, 29 Dec 2015 01:02:53 +0000 (01:02 +0000)]
Revert r93378, which is incorrect but currently unobservable (because the
underlying declaration of a NamedDecl happens to always have the same name
and identifier namespace as the decl itself today).

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

8 years agoFix up a comment and a bit of trailing whitespace.
Eric Christopher [Mon, 28 Dec 2015 21:57:05 +0000 (21:57 +0000)]
Fix up a comment and a bit of trailing whitespace.

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

8 years agoSmall refactoring in CheckerContext::isCLibraryFunction(). NFC.
Devin Coughlin [Mon, 28 Dec 2015 21:47:51 +0000 (21:47 +0000)]
Small refactoring in CheckerContext::isCLibraryFunction(). NFC.

Use getRedeclContext() instead of a manually-written loop and fix a comment.

A patch by Aleksei Sidorin!

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

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

8 years agoWe check for dwarf 5 in the backend, so go ahead and pass it along via
Eric Christopher [Mon, 28 Dec 2015 19:58:44 +0000 (19:58 +0000)]
We check for dwarf 5 in the backend, so go ahead and pass it along via
the front end as well.

Note that DWARF5 isn't finalized and any feature support is subject to
change and accepting of the option doesn't mean we're supporting the
full range of the current standard.

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

8 years agoDo not crash if class is defined in wrong scope.
Serge Pavlov [Mon, 28 Dec 2015 19:40:14 +0000 (19:40 +0000)]
Do not crash if class is defined in wrong scope.

This patch fixes PR16677. The latter represents the case when due to
misprinted character class definition occurs in the scope of template
arguments. Base class of this class depends on the template parameter in the
same scope and cannot be resolved, it causes crash. Right behavior is to
make semantic processing even if the definition is wrong, as the code
that emits appropriate message is called after the processing.

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

8 years agoComment and reorganize some of the target feature option sets.
Eric Christopher [Mon, 28 Dec 2015 19:07:48 +0000 (19:07 +0000)]
Comment and reorganize some of the target feature option sets.

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

8 years agoFix up comment in header.
Eric Christopher [Mon, 28 Dec 2015 19:07:46 +0000 (19:07 +0000)]
Fix up comment in header.

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

8 years agoAvoid crash when dumping LocInfoType.
Serge Pavlov [Mon, 28 Dec 2015 17:19:12 +0000 (17:19 +0000)]
Avoid crash when dumping LocInfoType.

LocInfoType is a helper type used internally inside Sema and Parser, it
does not exist in valid AST. LocInfoType uses code value outside the
range of valid Type codes, as a result, dumping such type causes error.
The fix allows correct dumping LocInfoType.

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

8 years agoSilence enumeral and non-enumeral type in conditional expression warning; NFC.
Aaron Ballman [Mon, 28 Dec 2015 15:52:46 +0000 (15:52 +0000)]
Silence enumeral and non-enumeral type in conditional expression warning; NFC.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Lex
Alexander Kornienko [Mon, 28 Dec 2015 15:30:42 +0000 (15:30 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Lex

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: dblaikie

Subscribers: dblaikie, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in tools/libclang
Alexander Kornienko [Mon, 28 Dec 2015 15:24:08 +0000 (15:24 +0000)]
Refactor: Simplify boolean conditional return statements in tools/libclang

Summary: Use clang-tidy to simplify boolean conditional return statements.

Reviewers: alexfh

Subscribers: alexfh, chfast, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend
Alexander Kornienko [Mon, 28 Dec 2015 15:19:39 +0000 (15:19 +0000)]
Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: dcoughlin, alexfh

Subscribers: alexfh, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Frontend
Alexander Kornienko [Mon, 28 Dec 2015 15:15:16 +0000 (15:15 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Frontend

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: alexfh

Subscribers: alexfh, cfe-commits

Patch by Richard Thomson!

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

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

8 years ago[X86] Better support for the MCU psABI (clang part)
Michael Kuperstein [Mon, 28 Dec 2015 14:39:54 +0000 (14:39 +0000)]
[X86] Better support for the MCU psABI (clang part)

This adds support for the MCU psABI in a way different from r251223 and r251224,
basically reverting most of these two patches. The problem with the approach
taken in r251223/4 is that it only handled libcalls that originated from the backend.
However, the mid-end also inserts quite a few libcalls and assumes these use the
platform's default calling convention.

The previous patch tried to insert inregs when necessary both in the FE and,
somewhat hackily, in the CG. Instead, we now define a new default calling convention
for the MCU, which doesn't use inreg marking at all, similarly to what x86-64 does.

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers
Alexander Kornienko [Mon, 28 Dec 2015 13:06:58 +0000 (13:06 +0000)]
Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers

Summary: Use clang-tidy to simplify boolean conditional return values

Reviewers: dcoughlin, krememek

Subscribers: krememek, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoclang-format: Fix incorrect function type detection.
Daniel Jasper [Mon, 28 Dec 2015 07:44:25 +0000 (07:44 +0000)]
clang-format: Fix incorrect function type detection.

Before:
  int x = f (&h)();

After:
  int x = f(&h)();

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

8 years ago[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
Alexey Bataev [Mon, 28 Dec 2015 07:25:51 +0000 (07:25 +0000)]
[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
OpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])
Where kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.
OpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])
Modifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.

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

8 years ago[OPENMP 4.5] Do not allow 'linear' clause along with 'ordered(expr)' clause.
Alexey Bataev [Mon, 28 Dec 2015 06:23:08 +0000 (06:23 +0000)]
[OPENMP 4.5] Do not allow 'linear' clause along with 'ordered(expr)' clause.
According to OpenMP 4.5 "A linear clause or an ordered clause with a parameter can be specified on a loop directive but not both.""

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

8 years ago[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC
Craig Topper [Sun, 27 Dec 2015 21:55:19 +0000 (21:55 +0000)]
[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC

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

8 years agoConstify NestedNameSpecifier::dump and add a no-argument dump function suitable for...
Yaron Keren [Sun, 27 Dec 2015 14:34:22 +0000 (14:34 +0000)]
Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for calling from a debugger.

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

8 years agoOn {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.
Dimitry Andric [Sun, 27 Dec 2015 10:36:44 +0000 (10:36 +0000)]
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.

Summary:
See also:
https://sourceware.org/binutils/docs/as/MIPS-Options.html#index-g_t_0040code_007b_002dG_007d-option-_0028MIPS_0029-1392

Reviewers: theraven, atanasyan, brooks, emaste

Subscribers: rnk, emaste, cfe-commits, seanbruno, dim

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

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

8 years agoFix C++ support on recent DragonFly BSD releases
Dimitry Andric [Sun, 27 Dec 2015 10:01:44 +0000 (10:01 +0000)]
Fix C++ support on recent DragonFly BSD releases

Summary:
[ Copied from https://llvm.org/bugs/show_bug.cgi?id=25597 ]

Clang support for DragonFly BSD is lagging a bit, resulting in poor
support for c++.

DragonFlyBSD is unique in that it has two base compilers.  At the time
of the last Clang update for DragonFly, these compilers were GCC 4.4 and
GCC 4.7 (default).

With DragonFly Release 4.2, GCC 4.4 was replaced with GCC 5.0, partially
because the C++11 support of GCC 4.7 was incomplete.  The DragonFly
project will Release version 4.4 soon.

This patch updates the Clang driver to use libstdc++ from GCC 5.2 The
support for falling back to the alternate compiler was removed for two
reasons:

1) The last release to use GCC 4.7 is DF 4.0 which has already reached EOL
2) GCC 4.7 libstdc++ is insufficient for many "ports"

Therefore, I think it is reasonable that the development version of
clang expects GCC 5.2 to be in place and not try to fall back to another
compiler.

The attached patch will do this.  The Tools.cpp file was signficantly
modified to fix the linking which had been changed somewhere along the
line.  The rest of the changes should be self-explanatory.

Reviewers: joerg, rsmith, davide

Subscribers: jrmarino, davide, cfe-commits

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

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

8 years agoArrayRef-ize TemplateParameterList. NFC
David Majnemer [Sun, 27 Dec 2015 07:16:27 +0000 (07:16 +0000)]
ArrayRef-ize TemplateParameterList. NFC

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

8 years agoFor FreeBSD on mips, pass -G options to the linker
Dimitry Andric [Sun, 27 Dec 2015 06:47:09 +0000 (06:47 +0000)]
For FreeBSD on mips, pass -G options to the linker

Summary:
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the linker.  See also:

https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html#index-G-2007

This has been adapted from https://reviews.freebsd.org/D1190, with an added test case.

Reviewers: theraven, atanasyan, emaste

Subscribers: brooks, tomatabacu, cfe-commits, seanbruno, emaste

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

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

8 years agoPrune the feature "tls". No one is using it since TLS is enabled for Cygwin.
NAKAMURA Takumi [Sun, 27 Dec 2015 06:14:33 +0000 (06:14 +0000)]
Prune the feature "tls". No one is using it since TLS is enabled for Cygwin.

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

8 years agoSema.h: Prune '\param NumExprs' corresponding to r256401. [-Wdocumentation]
NAKAMURA Takumi [Fri, 25 Dec 2015 16:19:28 +0000 (16:19 +0000)]
Sema.h: Prune '\param NumExprs' corresponding to r256401. [-Wdocumentation]

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

8 years ago[OPENMP] Do not allow to use threadprivate or thread local variables as loop iteratio...
Alexey Bataev [Fri, 25 Dec 2015 13:38:08 +0000 (13:38 +0000)]
[OPENMP] Do not allow to use threadprivate or thread local variables as loop iteration variables.
According to OpenMP the loop iteration variable may not appear in a threadprivate directive.

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

8 years agoclang-format: [TableGen] Support ;-less include lines.
Daniel Jasper [Fri, 25 Dec 2015 08:53:31 +0000 (08:53 +0000)]
clang-format: [TableGen] Support ;-less include lines.

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

8 years agoRevert r256399 "[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC"
Craig Topper [Fri, 25 Dec 2015 00:36:02 +0000 (00:36 +0000)]
Revert r256399 "[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC"

It broke lldb build.

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

8 years ago[Sema] ArrayRef-ize SubstExprs. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:29 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize SubstExprs. NFC

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

8 years ago[Sema] ArrayRef-ize ActOnTemplateParameterList. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:25 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ActOnTemplateParameterList. NFC

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

8 years ago[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:20 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC

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

8 years ago[Sema] ArrayRef-ize BuildObjCDictionaryLiteral. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:15 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize BuildObjCDictionaryLiteral. NFC

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

8 years ago[Sema] ArrayRef-ize ParseObjCStringLiteral and CodeCompleteObjCProtocolReferences...
Craig Topper [Thu, 24 Dec 2015 23:58:11 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ParseObjCStringLiteral and CodeCompleteObjCProtocolReferences. NFC

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

8 years agoSome minor correction based on David Blaikie post-commit code review for r255281.
Ekaterina Romanova [Thu, 24 Dec 2015 22:52:41 +0000 (22:52 +0000)]
Some minor correction based on David Blaikie post-commit code review for r255281.

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

8 years agofix test that depends on LLVM optimizations
Sanjay Patel [Thu, 24 Dec 2015 21:53:40 +0000 (21:53 +0000)]
fix test that depends on LLVM optimizations

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

8 years agouse auto for obvious type; NFC
Sanjay Patel [Thu, 24 Dec 2015 21:11:29 +0000 (21:11 +0000)]
use auto for obvious type; NFC

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

8 years ago[X86][ms-inline asm] Test case for adding support for memory operands that include...
Marina Yatsina [Thu, 24 Dec 2015 12:11:40 +0000 (12:11 +0000)]
[X86][ms-inline asm] Test case for adding support for memory operands that include structs

Test case for commit 256381

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

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

8 years agoReplace llvm::utostr calls in Twine context with Twines. NFC.
Benjamin Kramer [Thu, 24 Dec 2015 10:07:37 +0000 (10:07 +0000)]
Replace llvm::utostr calls in Twine context with Twines. NFC.

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

8 years ago[TrailingObjects] Convert ASTTemplateKWAndArgsInfo and ASTTemplateArgumentListInfo.
James Y Knight [Thu, 24 Dec 2015 02:59:37 +0000 (02:59 +0000)]
[TrailingObjects] Convert ASTTemplateKWAndArgsInfo and ASTTemplateArgumentListInfo.

Doing so required separating them so that the former doesn't inherit
from the latter anymore. Investigating that, it became clear that the
inheritance wasn't actually providing real value in any case.

So also:
- Remove a bunch of redundant functions (getExplicitTemplateArgs,
  getOptionalExplicitTemplateArgs) on various Expr subclasses which
  depended on the inheritance relationship.
- Switched external callers to use pre-existing accessors that return the
  data they're actually interested in (getTemplateArgs,
  getNumTemplateArgs, etc).
- Switched internal callers to use pre-existing getTemplateKWAndArgsInfo.

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

8 years ago[StaticAnalyzer] Use front() and back() instead of dereferencing begin() and rbegin...
Craig Topper [Thu, 24 Dec 2015 02:55:45 +0000 (02:55 +0000)]
[StaticAnalyzer] Use front() and back() instead of dereferencing begin() and rbegin(). Makes the code a little cleaner. NFC

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

8 years agoReplace isa+cast with dyn_cast and obey the no else after return rule.
Yaron Keren [Wed, 23 Dec 2015 20:38:13 +0000 (20:38 +0000)]
Replace isa+cast with dyn_cast and obey the no else after return rule.

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

8 years agoclang-format: Lower penalty for breaking between array subscripts.
Daniel Jasper [Wed, 23 Dec 2015 18:01:43 +0000 (18:01 +0000)]
clang-format: Lower penalty for breaking between array subscripts.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaa(aaaaaaaaaaaa)][bbbbbbbbbbb(
      bbbbbbbbbbbb)]

After:
  aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaa(aaaaaaaaaaaa)]
                           [bbbbbbbbbbb(bbbbbbbbbbbb)]

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

8 years agoclang-format: Fix incorrect pointer detection.
Daniel Jasper [Wed, 23 Dec 2015 18:01:29 +0000 (18:01 +0000)]
clang-format: Fix incorrect pointer detection.

Before:
  return * this += 1;

After:
  return *this += 1;

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

8 years ago[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
Alexey Bataev [Wed, 23 Dec 2015 10:27:45 +0000 (10:27 +0000)]
[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.

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

8 years ago[Sema] Make an enum local to the only method that uses it. NFC
Craig Topper [Wed, 23 Dec 2015 05:44:46 +0000 (05:44 +0000)]
[Sema] Make an enum local to the only method that uses it. NFC

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

8 years ago[Sema] Use available enum types instead of integers. As one is used in a switch,...
Craig Topper [Wed, 23 Dec 2015 05:44:43 +0000 (05:44 +0000)]
[Sema] Use available enum types instead of integers. As one is used in a switch, this makes the compiler ensure the switch is fully covered. NFC

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

8 years agoDisable include sorting by default for Chromium style.
Nico Weber [Tue, 22 Dec 2015 22:42:56 +0000 (22:42 +0000)]
Disable include sorting by default for Chromium style.

Include sorting generally can break .cc files, especially on Windows.  Make
this opt-in for Chromium style to give us some more time to roll this out.

(Given that the Google style guide is used by many companies, some of them
probably writing code on Windows, one could argue this should be opt-in in
general...)

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

8 years agoDocument that we recommend to turn off -gmodules when building a static
Adrian Prantl [Tue, 22 Dec 2015 22:37:22 +0000 (22:37 +0000)]
Document that we recommend to turn off -gmodules when building a static
library for distribution to other machines on the clang man page.

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

8 years agoMake wasm-toolchain.c test pass on Windows.
Nico Weber [Tue, 22 Dec 2015 22:30:14 +0000 (22:30 +0000)]
Make wasm-toolchain.c test pass on Windows.

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

8 years ago[ASTMatchers] Fix typo in booleanType() doc.
Samuel Benzaquen [Tue, 22 Dec 2015 21:06:36 +0000 (21:06 +0000)]
[ASTMatchers] Fix typo in booleanType() doc.

Fix typo in booleanType() doc and recreate the
LibASTMatchersReference.html reference document.

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

8 years ago[ASTMatchers] Add booleanType() matcher.
Samuel Benzaquen [Tue, 22 Dec 2015 20:06:40 +0000 (20:06 +0000)]
[ASTMatchers] Add booleanType() matcher.

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

8 years agoclang-format: [JS] Support arrays of object-type literals.
Daniel Jasper [Tue, 22 Dec 2015 15:48:35 +0000 (15:48 +0000)]
clang-format: [JS] Support arrays of object-type literals.

Before:
  interface I {
    o: {}
    [];
  }

After:
  interface I {
    o: {}[];
  }

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

8 years agoclang-format: [JS] Conservatively introduce column layout for JS array
Daniel Jasper [Tue, 22 Dec 2015 15:48:15 +0000 (15:48 +0000)]
clang-format: [JS] Conservatively introduce column layout for JS array
initializers. For now, only use it for 20 items or more. Otherwise,
clang-format formats these one-per-line and thus increases the vertical
code size a lot.

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

8 years agoclang-format: [JS] "operator" is not a keyword in Java/JavaScript.
Daniel Jasper [Tue, 22 Dec 2015 15:47:56 +0000 (15:47 +0000)]
clang-format: [JS] "operator" is not a keyword in Java/JavaScript.

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

8 years ago[OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer
Anastasia Stulova [Tue, 22 Dec 2015 15:14:54 +0000 (15:14 +0000)]
[OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer

If there are two pointers passed to an atomic Builtin,
Clang doesn't allow the second (non-atomic) one to be qualified
with an address space.

Remove this restriction by recording the address space of passed pointers
in atomics type diagnostics.

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

8 years ago[mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.
Daniel Sanders [Tue, 22 Dec 2015 12:59:30 +0000 (12:59 +0000)]
[mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.

This fixes the 'pure virtual function called' failure with ThreadPool in a
clang-built clang. This fixes the llvm-mips-linux builder.

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

8 years ago[OPENMP] Revert r256238 to fix the problem with tests on Linux.
Alexey Bataev [Tue, 22 Dec 2015 12:44:46 +0000 (12:44 +0000)]
[OPENMP] Revert r256238 to fix the problem with tests on Linux.

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

8 years ago[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
Alexey Bataev [Tue, 22 Dec 2015 12:21:47 +0000 (12:21 +0000)]
[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.

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

8 years agoPull out a bunch of duplicated option handling code into its own
Eric Christopher [Tue, 22 Dec 2015 03:12:34 +0000 (03:12 +0000)]
Pull out a bunch of duplicated option handling code into its own
function and use for the targets that can easily support it.

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

8 years agoUse -no-canonical-prefixes to make sure binaries names are easier to match.
Eric Christopher [Tue, 22 Dec 2015 01:45:45 +0000 (01:45 +0000)]
Use -no-canonical-prefixes to make sure binaries names are easier to match.

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

8 years ago[WebAssembly] Remove the -target command-line flag from the ld commandline.
Dan Gohman [Mon, 21 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Remove the -target command-line flag from the ld commandline.

This flag isn't needed, or permitted, with the "ld" flavor of lld.

Also, add a basic ld commandline test.

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

8 years ago[clang-cl] Add support for /Brepro
David Majnemer [Mon, 21 Dec 2015 22:09:34 +0000 (22:09 +0000)]
[clang-cl] Add support for /Brepro

The /Brepro flag controls whether or not the compiler should embed
timestamps into the object file.  Object files which do not embed
timestamps are not suitable for incremental linking but are suitable for
hermetic build systems and staged self-hosts of clang.

A normal clang spelling of this flag has been added,
-mincremental-linker-compatible.

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

8 years agoTweak myriad-toolchain test.
James Y Knight [Mon, 21 Dec 2015 20:30:49 +0000 (20:30 +0000)]
Tweak myriad-toolchain test.

The test failed when run on a SPARC host, since it was finding the
native gcc installation by accident.

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

8 years agoReapply "[CodeGen] Fix assignments of inline layouts into the byref structure"
Vedant Kumar [Mon, 21 Dec 2015 20:21:15 +0000 (20:21 +0000)]
Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure"

When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.

Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.

The original version of this patch was too invasive. This version only adds the
cast to BuildByrefLayout.

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

rdar://23713871

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

8 years agoRevert "[CodeGen] Fix assignments of inline layouts into the byref structure"
Vedant Kumar [Mon, 21 Dec 2015 19:43:25 +0000 (19:43 +0000)]
Revert "[CodeGen] Fix assignments of inline layouts into the byref structure"

This reverts commit r256185. It breaks CodeGenObjC/fragile-arc.m.

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

8 years ago[CodeGen] Fix assignments of inline layouts into the byref structure
Vedant Kumar [Mon, 21 Dec 2015 19:30:37 +0000 (19:30 +0000)]
[CodeGen] Fix assignments of inline layouts into the byref structure

When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.

Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.

rdar://23713871

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

8 years agoclang-format: Properly set the BlockKind for more blocks.
Daniel Jasper [Mon, 21 Dec 2015 18:31:15 +0000 (18:31 +0000)]
clang-format: Properly set the BlockKind for more blocks.

Before:
  void f() { struct Dummy { };
    f();
  }

After:
  void f() {
    struct Dummy {};
    f();
  }

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

8 years agoclang-format: Only consider the first #include that looks right to be
Daniel Jasper [Mon, 21 Dec 2015 17:28:24 +0000 (17:28 +0000)]
clang-format: Only consider the first #include that looks right to be
the main #include.

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

8 years agoclang-format: [JS] Change Google-style default for aligning operands.
Daniel Jasper [Mon, 21 Dec 2015 13:52:19 +0000 (13:52 +0000)]
clang-format: [JS] Change Google-style default for aligning operands.

The style guide allows both, but apparently, this is the more dominant use.

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

8 years agoclang-format: Only try to find the "main" include in the first block of
Daniel Jasper [Mon, 21 Dec 2015 13:40:49 +0000 (13:40 +0000)]
clang-format: Only try to find the "main" include in the first block of
includes.

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

8 years ago[scan-view] replace deprecated optparse with argparse
Alexander Kornienko [Mon, 21 Dec 2015 12:19:13 +0000 (12:19 +0000)]
[scan-view] replace deprecated optparse with argparse

Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8

Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna

Subscribers: cfe-commits

Patch by Kirill Bobyrev!

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

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

8 years agoclang-format: Extend detection of the "main" #include to use the filename
Daniel Jasper [Mon, 21 Dec 2015 12:14:17 +0000 (12:14 +0000)]
clang-format: Extend detection of the "main" #include to use the filename

Before, the first (non-system) header in a file was considered to be
the main include. This is conservative as it makes clang-format change
the #include order less often. Instead implement some basic usage of
the filename itself. With this patch, clang-format considers every
header to be a main include if the header file's basename is a prefix
to the filename the #include is in.

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

8 years ago[Driver] Pass -O* to the gold plugin via -plugin-opt
James Molloy [Mon, 21 Dec 2015 10:44:36 +0000 (10:44 +0000)]
[Driver] Pass -O* to the gold plugin via -plugin-opt

The gold plugin understands -O0..-O3, but these are not currently being passed to it.

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

8 years ago[Sema] Use range-based for loops. NFC
Craig Topper [Mon, 21 Dec 2015 06:35:56 +0000 (06:35 +0000)]
[Sema] Use range-based for loops. NFC

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

8 years ago[Cygwin] Enable TLS as emutls.
NAKAMURA Takumi [Mon, 21 Dec 2015 02:37:23 +0000 (02:37 +0000)]
[Cygwin] Enable TLS as emutls.

It resolves clang selfhosting with std::once() for Cygwin.

FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.

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

8 years ago[X86] Add missing m64/int64 conversions
Michael Kuperstein [Sun, 20 Dec 2015 12:37:18 +0000 (12:37 +0000)]
[X86] Add missing m64/int64 conversions

Define the 64-bit equivalents of _m_to_int and _m_from_int.

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

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

8 years ago[X86] Add signed aliases for popcnt intrinsics
Michael Kuperstein [Sun, 20 Dec 2015 12:35:35 +0000 (12:35 +0000)]
[X86] Add signed aliases for popcnt intrinsics

The Intel manual documents both an unsigned form (_mm_popcnt_u32)
and a signed form (_popcnt32) of the intrinsic. Add the missing signed form.

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

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

8 years agoDriver part of debugger tuning.
Paul Robinson [Sat, 19 Dec 2015 19:41:48 +0000 (19:41 +0000)]
Driver part of debugger tuning.

Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>.  (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.

As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.

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

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

8 years agoRevert "[CMake] Support a simple case for bootstrap builds to generate PGO data"
Chris Bieneman [Sat, 19 Dec 2015 05:47:50 +0000 (05:47 +0000)]
Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"

This reverts commit r256069, which was an unintentional tag along on
another commit.

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

8 years agoTest for diagnostic quality improvement in r256049.
Richard Smith [Sat, 19 Dec 2015 03:12:14 +0000 (03:12 +0000)]
Test for diagnostic quality improvement in r256049.

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

8 years agoFix crash-on-invalid if a :: is followed by two or more open parentheses (and then...
Richard Smith [Sat, 19 Dec 2015 02:40:19 +0000 (02:40 +0000)]
Fix crash-on-invalid if a :: is followed by two or more open parentheses (and then something else).

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

8 years agoRecommit CC1 part of debugger tuning; pass through setting from driver to LLVM.
Paul Robinson [Sat, 19 Dec 2015 02:24:10 +0000 (02:24 +0000)]
Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.

Reapplies r256063, except instead of frugally re-using an LLVM enum,
we define a Clang enum, to avoid exposing too much LLVM interface.

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

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

8 years agoUse a command line alias to remove the need to rewrite a subtarget
Eric Christopher [Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)]
Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.

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

8 years ago[CMake] Fixing a typo in a flag
Chris Bieneman [Sat, 19 Dec 2015 00:56:12 +0000 (00:56 +0000)]
[CMake] Fixing a typo in a flag

Turns out cc1's flag has 1 - not 2...

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

8 years ago[CMake] Support a simple case for bootstrap builds to generate PGO data
Chris Bieneman [Sat, 19 Dec 2015 00:56:10 +0000 (00:56 +0000)]
[CMake] Support a simple case for bootstrap builds to generate PGO data

Summary:
This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler.

With this patch applied you can configure your build directory with the following invocation of CMake:

cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>

After configuration the following additional targets will be generated:

stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.

stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training

stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler.

stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.

stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.

stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.

stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite).

Reviewers: bogner, silvas, chandlerc

Subscribers: cfe-commits

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

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

8 years agoRevert r256063, it's killing clang-tools-extra
Paul Robinson [Sat, 19 Dec 2015 00:23:11 +0000 (00:23 +0000)]
Revert r256063, it's killing clang-tools-extra

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

8 years agoCC1 part of debugger tuning; pass through setting from driver to LLVM.
Paul Robinson [Fri, 18 Dec 2015 23:41:11 +0000 (23:41 +0000)]
CC1 part of debugger tuning; pass through setting from driver to LLVM.

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

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

8 years ago[CMake] PGO training data
Chris Bieneman [Fri, 18 Dec 2015 23:00:57 +0000 (23:00 +0000)]
[CMake] PGO training data

Adding in a few more lit substitutions for cc1 and the test exec path.

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