]> granicus.if.org Git - clang/log
clang
9 years agoMake the clang module container format selectable from the command line.
Adrian Prantl [Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)]
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

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

9 years ago__builtin_setjmp/__builtin_longjmp is support on ARM now
Matthias Braun [Fri, 17 Jul 2015 00:46:27 +0000 (00:46 +0000)]
__builtin_setjmp/__builtin_longjmp is support on ARM now

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

9 years agoAllow __builtin_setjmp/__builtin_longjmp on ARM
Matthias Braun [Fri, 17 Jul 2015 00:15:22 +0000 (00:15 +0000)]
Allow __builtin_setjmp/__builtin_longjmp on ARM

The problems in the llvm target got fixed in r242481 and r242482.

Related to rdar://20544153, rdar://20660786

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

9 years agoDoxygen: Enable autobrief feature, matching llvm config/coding standards.
James Dennett [Thu, 16 Jul 2015 23:17:43 +0000 (23:17 +0000)]
Doxygen: Enable autobrief feature, matching llvm config/coding standards.

Summary: This corresponds to the change made in r237417 - "Doxygen: Enable autobrief feature and update coding standards."

Reviewers: eliben

Subscribers: eliben, cfe-commits

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

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

9 years agoclang-format: Respect IndentWrappedFunctionNames when aligning colons
Daniel Jasper [Thu, 16 Jul 2015 22:58:24 +0000 (22:58 +0000)]
clang-format: Respect IndentWrappedFunctionNames when aligning colons

Before:
  - (void)shortf:(GTMFoo *)theFoo
  dontAlignNamef:(NSRect)theRect {
  }

After:
  - (void)shortf:(GTMFoo *)theFoo
      dontAlignNamef:(NSRect)theRect {
  }

Patch by Kwasi Mensah, thank you!

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

9 years ago[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl
Davide Italiano [Thu, 16 Jul 2015 22:37:54 +0000 (22:37 +0000)]
[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl

This (hopefully) brings more clarity. No functional changes (intended).

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

9 years agoAdd __has_feature(attribute_availability_with_version_underscores).
Jordan Rose [Thu, 16 Jul 2015 22:30:10 +0000 (22:30 +0000)]
Add __has_feature(attribute_availability_with_version_underscores).

This goes with r218884 from, um, last autumn.

rdar://problem/21754114

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

9 years agoDocumentation cleanup. No functional change intended.
James Dennett [Thu, 16 Jul 2015 22:06:34 +0000 (22:06 +0000)]
Documentation cleanup.  No functional change intended.

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

9 years ago[SemaType] Use a range loop.
Davide Italiano [Thu, 16 Jul 2015 19:31:40 +0000 (19:31 +0000)]
[SemaType] Use a range loop.

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

9 years agoFixed an error in cuda-options.cu test:
Artem Belevich [Thu, 16 Jul 2015 17:24:18 +0000 (17:24 +0000)]
Fixed an error in cuda-options.cu test:
  -target option must be used without '='.

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

9 years agoDisable #pragma redefine_extname for C++ code as it does not make sense in such a...
Aaron Ballman [Thu, 16 Jul 2015 17:06:53 +0000 (17:06 +0000)]
Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.

Patch by Andrey Bokhanko!

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

9 years agoclang-format: [Proto] Handle enum bodies differently.
Daniel Jasper [Thu, 16 Jul 2015 14:25:43 +0000 (14:25 +0000)]
clang-format: [Proto] Handle enum bodies differently.

In proto, enum constants can contain complex options and should be
handled more like individual declarations.

Before:
  enum Type {
    UNKNOWN = 0 [(some_options) =
                     {
                       a: aa,
                       b: bb
                     }];
  };

After:
  enum Type {
    UNKNOWN = 0 [(some_options) = {
      a: aa,
      b: bb
    }];
  };

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

9 years agoActually "RUN:" the tests...
Filipe Cabecinhas [Thu, 16 Jul 2015 05:22:17 +0000 (05:22 +0000)]
Actually "RUN:" the tests...

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

9 years ago[OPENMP] Fixed detection of canonical loops with random access iterators.
Alexey Bataev [Thu, 16 Jul 2015 04:19:43 +0000 (04:19 +0000)]
[OPENMP] Fixed detection of canonical loops with random access iterators.

Add handling of iterators with copy/move constructors with default arguments + converting template constructors.

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

9 years ago[Intrin.h] Use compiler builtins to model memory barriers
David Majnemer [Thu, 16 Jul 2015 03:13:02 +0000 (03:13 +0000)]
[Intrin.h] Use compiler builtins to model memory barriers

_ReadBarrier, _WriteBarrier, and _ReadWriteBarrier are essentially
memory barriers of one form or another.  Model these as
atomic_signal_fence(ATOMIC_SEQ_CST).

__faststorefence is a curious intrinsic.  It's single purpose seems to
an alternative to mfence when that instruction is slow.  However, mfence
is not always slow and is, in general, preferable to a 'lock or'
sequence on certain CPUs.  Give the compiler freedom to select the best
sequence to get a fence.

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

9 years agoPR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appear...
Nikola Smiljanic [Thu, 16 Jul 2015 01:06:17 +0000 (01:06 +0000)]
PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared.

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

9 years ago[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
Akira Hatanaka [Thu, 16 Jul 2015 00:43:00 +0000 (00:43 +0000)]
[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
"-arm-use-movt=0".

This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.

rdar://problem/21529937

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

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

9 years agoRevert r242365.
Evgeniy Stepanov [Thu, 16 Jul 2015 00:32:26 +0000 (00:32 +0000)]
Revert r242365.

r242365 removed two unrelated files by accident.

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

9 years agoupdated tests for correct commit, concerning D11198
Naomi Musgrave [Thu, 16 Jul 2015 00:25:46 +0000 (00:25 +0000)]
updated tests for correct commit, concerning D11198

Summary: Updating missed changes in revision D11198

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

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

9 years agoupdated tests for correct commit
Naomi Musgrave [Thu, 16 Jul 2015 00:25:45 +0000 (00:25 +0000)]
updated tests for correct commit

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

9 years agoadding tests for various dtor decl types
Naomi Musgrave [Wed, 15 Jul 2015 22:57:10 +0000 (22:57 +0000)]
adding tests for various dtor decl types

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

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

9 years ago[clang-cl] Use the Windows response file tokenizer
Reid Kleckner [Wed, 15 Jul 2015 22:42:37 +0000 (22:42 +0000)]
[clang-cl] Use the Windows response file tokenizer

We were still using the Unix response file tokenizer for all driver
modes. This was difficult to get right in the beginning because there is
a circular dependency. The Driver class also can't officially determine
its mode until it can see all possible --driver-mode= flags, and those
flags could come from the response file.

Now we use the Windows parsing algorithm if the program name looks like
clang-cl, or if the --driver-mode=cl flag is present on the main command
line.

Fixes PR23709.

Reviewers: hans

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

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

9 years agoFinally, with no users for shell-preserves-root, remove it from lit.cfg.
Yaron Keren [Wed, 15 Jul 2015 20:41:28 +0000 (20:41 +0000)]
Finally, with no users for shell-preserves-root, remove it from lit.cfg.

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

9 years ago[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling...
Gabor Horvath [Wed, 15 Jul 2015 20:32:07 +0000 (20:32 +0000)]
[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling lib, an analyzer plugin is loaded, but the runtime linker fails to link.

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

9 years agoErase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ
Yaron Keren [Wed, 15 Jul 2015 20:04:18 +0000 (20:04 +0000)]
Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ

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

9 years agoErase REQUIRES: shell-preserves-root from more tests, see r242312.
Yaron Keren [Wed, 15 Jul 2015 19:42:18 +0000 (19:42 +0000)]
Erase REQUIRES: shell-preserves-root from more tests, see r242312.

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

9 years agoAllow any comment to be a trailing comment when -fparse-all-comments is on.
James Dennett [Wed, 15 Jul 2015 19:13:39 +0000 (19:13 +0000)]
Allow any comment to be a trailing comment when -fparse-all-comments is on.

This helps with freeform documentation styles, where otherwise code like
  enum class E {
    E1,  // D1
    E2   // D2
  };
would result in D1 being associated with E2. To properly associate E1
with D1 and E2 with D2, this patch allows all raw comments C such that
C.isParseAllComments() to participate in trailing comment checks inside
getRawCommentForDeclNoCache. This takes care of linking the intended
documentation with the intended decls. There remains an issue with code
like:
  foo();  // DN
  int x;
To prevent DN from being associated with x, this patch adds a new test
on preceding-line comments C (where C.isParseAllComments() and also
C's kind is RCK_OrdinaryBCPL or RCK_OrdinaryC) that checks whether C
is the first non-whitespace thing on C's starting line.

Patch from Luke Zarko <zarko@google.com>, D11069 reviewed by rsmith.

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

9 years agoclang-format: Fix return type breaking with overloaded operator functions
Birunthan Mohanathas [Wed, 15 Jul 2015 19:11:58 +0000 (19:11 +0000)]
clang-format: Fix return type breaking with overloaded operator functions

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

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

9 years ago-disable-llvm-optzns in one clang test.
Evgeniy Stepanov [Wed, 15 Jul 2015 18:57:57 +0000 (18:57 +0000)]
-disable-llvm-optzns in one clang test.

The intent is to test Clang codegen at -O1, and not the LLVM
optimization pipeline.

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

9 years agoActually requiring shell disables the test on Windows whereas
Yaron Keren [Wed, 15 Jul 2015 18:55:39 +0000 (18:55 +0000)]
Actually requiring shell disables the test on Windows whereas
previously requiring shell-preserves-root did not, so do not
require anything.

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

9 years ago[PPC64] Update tests for vec_sld
Bill Schmidt [Wed, 15 Jul 2015 18:55:02 +0000 (18:55 +0000)]
[PPC64] Update tests for vec_sld

Revision 224297 modified the behavior of vec_sld for little endian so
that LLVM will generate the correct corresponding vsldoi instruction.
I neglected to update the existing tests, which continued to pass
because they were not specific enough.  This patch adds enough
specificity to the tests to make them useful for BE and LE testing of
vec_sld.

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

9 years agoSince r179283, internal shell is default on windows and so shell-preserves-root
Yaron Keren [Wed, 15 Jul 2015 18:40:05 +0000 (18:40 +0000)]
Since r179283, internal shell is default on windows and so shell-preserves-root
is true on MSYS bash although this requires: used to disable tests on MSYS bash.

Nevertheless, all tests requiring shell-preserves-root do pass except for
Driver/darwin-sdkroot.c. It will require a patch, either by disabling it on
Windows or by fixing shell-preserves-root to really be true only on MSYS
and making darwin-sdkroot.c its only user.

In any case, all other tests requiring shell-preserves-root do not really require
it so I'm replacing REQUIRES: shell-preserves-root with REQUIRES: shell in two
tests first.

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

9 years agoRun clang-format on Tools.h, the indentation is inconsistent
Reid Kleckner [Wed, 15 Jul 2015 17:58:55 +0000 (17:58 +0000)]
Run clang-format on Tools.h, the indentation is inconsistent

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

9 years ago[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode
David Majnemer [Wed, 15 Jul 2015 17:32:34 +0000 (17:32 +0000)]
[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode

MSVC 4.2 didn't have bool as a builtin type but MSVC 5.0 does.  When
they added it, they added a macro (__BOOL_DEFINED) which allows build
scripts and the like to know if they should provide their own bool.

Clang always supports bool as a builtin type in C++ mode.

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

9 years agoAdd the ability to AST match a variable declaration that is an exception variable.
Aaron Ballman [Wed, 15 Jul 2015 17:11:21 +0000 (17:11 +0000)]
Add the ability to AST match a variable declaration that is an exception variable.

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

9 years agoclang-format: Fix column layout with a comment in the last line.
Daniel Jasper [Wed, 15 Jul 2015 16:26:47 +0000 (16:26 +0000)]
clang-format: Fix column layout with a comment in the last line.

Before:
  int aaaaa[] = {
      1, 2,
      3, // comment
      4, 5,
      6  // comment
  };

After:
  int aaaaa[] = {
      1, 2, 3, // comment
      4, 5, 6  // comment
  };

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

9 years ago[PPC64LE] Fix vec_sld semantics for little endian
Bill Schmidt [Wed, 15 Jul 2015 15:45:53 +0000 (15:45 +0000)]
[PPC64LE] Fix vec_sld semantics for little endian

The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode.  It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.

For GCC, this was implemented as "Don't touch the vec_sld"
implementation.  When it came time for the LLVM implementation, I did
the same thing.  However, this was hasty and incorrect.  In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface.  Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE.  Not good.

This patch adjusts the form of vec_perm that is used for vec_sld and
vec_vsldoi, effectively undoing the modifications so that the same
vsldoi instruction will be generated for both BE and LE.

There is an accompanying back-end patch to take care of some small
ripple effects caused by these changes.

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

9 years agoSet comdat when an available_externally thunk is converted to linkonce_odr.
Rafael Espindola [Wed, 15 Jul 2015 14:48:06 +0000 (14:48 +0000)]
Set comdat when an available_externally thunk is converted to linkonce_odr.

Fixes pr24130.

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

9 years agoAdd support for armv7-windows-gnu targets to the clang front end.
Yaron Keren [Wed, 15 Jul 2015 13:32:23 +0000 (13:32 +0000)]
Add support for armv7-windows-gnu targets to the clang front end.

http://reviews.llvm.org/D11071

Patch by Martell Malone
Reviewed by Reid Kleckner

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

9 years agoCodeGen: Improve CFI type blacklisting mechanism.
Peter Collingbourne [Wed, 15 Jul 2015 12:15:56 +0000 (12:15 +0000)]
CodeGen: Improve CFI type blacklisting mechanism.

We now use the sanitizer special case list to decide which types to blacklist.
We also support a special blacklist entry for types with a uuid attribute,
which are generally COM types whose virtual tables are defined externally.

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

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

9 years ago[OPENMP] http://llvm.org/PR24121: canonical loop rejected when comparison has implici...
Alexey Bataev [Wed, 15 Jul 2015 12:14:07 +0000 (12:14 +0000)]
[OPENMP] http://llvm.org/PR24121: canonical loop rejected when comparison has implicit conversions or destruction

Allow to use complex iterators expressions in loops for C++.

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

9 years agoFix test to run under MSYS2 by disabling MSYS conversion of /C /TP /TC.
Yaron Keren [Wed, 15 Jul 2015 10:45:25 +0000 (10:45 +0000)]
Fix test to run under MSYS2 by disabling MSYS conversion of /C /TP /TC.

Thanks to Alexpux.

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

9 years agoUpdate test comment that it fails the same way on MSYS2.
Yaron Keren [Wed, 15 Jul 2015 09:41:04 +0000 (09:41 +0000)]
Update test comment that it fails the same way on MSYS2.

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

9 years agoFix comments for several methods, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:53:08 +0000 (07:53 +0000)]
Fix comments for several methods, NFC

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

9 years agoRemove extra \brief comment, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:48:02 +0000 (07:48 +0000)]
Remove extra \brief comment, NFC

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

9 years agoDocumentation cleanup, mostly fixing summaries. No functional change intended.
James Dennett [Wed, 15 Jul 2015 00:22:41 +0000 (00:22 +0000)]
Documentation cleanup, mostly fixing summaries.  No functional change intended.

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

9 years ago[modules] Switch to the normal reverse postorder visitation algorithm when computing...
Richard Smith [Wed, 15 Jul 2015 00:02:40 +0000 (00:02 +0000)]
[modules] Switch to the normal reverse postorder visitation algorithm when computing redeclaration chains.

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

9 years ago[Sema] Don't emit "pure virtual" warning for fully qualified calls.
Davide Italiano [Tue, 14 Jul 2015 23:36:10 +0000 (23:36 +0000)]
[Sema] Don't emit "pure virtual" warning for fully qualified calls.

-fapple-kext is an exception because calls will still go through
the vtable in that mode. Add a note to make the user aware of that.

PR:   23215
Differential Revision:  http://reviews.llvm.org/D10935

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

9 years agoUpdate cxx_dr_status.html after 3.7 branch
Hans Wennborg [Tue, 14 Jul 2015 23:21:53 +0000 (23:21 +0000)]
Update cxx_dr_status.html after 3.7 branch

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

9 years agoMake the variable names match the name of the metadata they control.
Tyler Nowicki [Tue, 14 Jul 2015 23:03:09 +0000 (23:03 +0000)]
Make the variable names match the name of the metadata they control.

Rename Vectorizer to Vectorize and VectorizeUnroll to InterleaveCount.

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

9 years agodocs/conf.py: update version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 22:53:35 +0000 (22:53 +0000)]
docs/conf.py: update version to 3.8

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

9 years agoReleaseNotes.rst: Bump version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 22:52:36 +0000 (22:52 +0000)]
ReleaseNotes.rst: Bump version to 3.8

The notes for 3.7 are on the 3.7 branch.

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

9 years agoDriver: Delete dead code
Justin Bogner [Tue, 14 Jul 2015 22:36:22 +0000 (22:36 +0000)]
Driver: Delete dead code

VerifyJobActions never have multiple inputs.

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

9 years agoSema.h: Just prune a redundant \brief introduced in r242133, for now. [-Wdocumentation]
NAKAMURA Takumi [Tue, 14 Jul 2015 22:35:36 +0000 (22:35 +0000)]
Sema.h: Just prune a redundant \brief introduced in r242133, for now. [-Wdocumentation]

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

9 years agoAdd a "maximum TLS alignment" characteristic to the target info, so it
Paul Robinson [Tue, 14 Jul 2015 20:52:32 +0000 (20:52 +0000)]
Add a "maximum TLS alignment" characteristic to the target info, so it
can be different from the normal variable maximum.
Add an error diagnostic for when TLS variables exceed maximum TLS alignment.
Currenty only PS4 sets an explicit maximum TLS alignment.

Patch by Charles Li!

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

9 years ago[Sema] Emit a better diagnostic when variable redeclarations disagree
David Majnemer [Tue, 14 Jul 2015 20:08:49 +0000 (20:08 +0000)]
[Sema] Emit a better diagnostic when variable redeclarations disagree

We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate.  Instead, classify the declaration and emit
an appropriate diagnostic for the new declaration and an appropriate
note pointing to the old one.

This fixes PR24116.

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

9 years agoRun cuda options test only with specific target.
Artem Belevich [Tue, 14 Jul 2015 18:49:17 +0000 (18:49 +0000)]
Run cuda options test only with specific target.
For now it's only x86_64-linux-gnu.

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

9 years ago[modules] Avoid repeatedly hashing the same name when looking it up in multiple modul...
Richard Smith [Tue, 14 Jul 2015 18:42:41 +0000 (18:42 +0000)]
[modules] Avoid repeatedly hashing the same name when looking it up in multiple module files.

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

9 years ago[clang-cl] Disable C++ exceptions a different way
Reid Kleckner [Tue, 14 Jul 2015 18:16:48 +0000 (18:16 +0000)]
[clang-cl] Disable C++ exceptions a different way

Rather than making -fexceptions a core option that enables C++ EH in
clang-cl, users can use the '-Xclang -fexceptions -Xclang
-fcxx-exceptions' flag set. We weren't going to expose -fexceptions in
clang-cl in the long run, so this way we don't add and then remove a
flag.

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

9 years agoFixed 22941: Integer template parameter as immediate 'I' expectes an integer constant
Sunil Srivastava [Tue, 14 Jul 2015 18:08:50 +0000 (18:08 +0000)]
Fixed 22941: Integer template parameter as immediate 'I' expectes an integer constant
Basically fixed premature testing of integer constraints during template parsing
Reviewed at http://reviews.llvm.org/D10452

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

9 years agoAdd missing builtins to altivec.h for ABI compliance (vol. 4)
Nemanja Ivanovic [Tue, 14 Jul 2015 17:50:27 +0000 (17:50 +0000)]
Add missing builtins to altivec.h for ABI compliance (vol. 4)

This patch corresponds to review:
http://reviews.llvm.org/D11184

A number of new interfaces for altivec.h (as mandated by the ABI):
vector float vec_cpsgn(vector float, vector float)
vector double vec_cpsgn(vector double, vector double)
vector double vec_or(vector bool long long, vector double)
vector double vec_or(vector double, vector bool long long)
vector double vec_re(vector double)
vector signed char vec_cntlz(vector signed char)
vector unsigned char vec_cntlz(vector unsigned char)
vector short vec_cntlz(vector short)
vector unsigned short vec_cntlz(vector unsigned short)
vector int vec_cntlz(vector int)
vector unsigned int vec_cntlz(vector unsigned int)
vector signed long long vec_cntlz(vector signed long long)
vector unsigned long long vec_cntlz(vector unsigned long long)
vector signed char vec_nand(vector bool signed char, vector signed char)
vector signed char vec_nand(vector signed char, vector bool signed char)
vector signed char vec_nand(vector signed char, vector signed char)
vector unsigned char vec_nand(vector bool unsigned char, vector unsigned char)
vector unsigned char vec_nand(vector unsigned char, vector bool unsigned char)
vector unsigned char vec_nand(vector unsigned char, vector unsigned char)
vector short vec_nand(vector bool short, vector short)
vector short vec_nand(vector short, vector bool short)
vector short vec_nand(vector short, vector short)
vector unsigned short vec_nand(vector bool unsigned short, vector unsigned short)
vector unsigned short vec_nand(vector unsigned short, vector bool unsigned short)
vector unsigned short vec_nand(vector unsigned short, vector unsigned short)
vector int vec_nand(vector bool int, vector int)
vector int vec_nand(vector int, vector bool int)
vector int vec_nand(vector int, vector int)
vector unsigned int vec_nand(vector bool unsigned int, vector unsigned int)
vector unsigned int vec_nand(vector unsigned int, vector bool unsigned int)
vector unsigned int vec_nand(vector unsigned int, vector unsigned int)
vector signed long long vec_nand(vector bool long long, vector signed long long)
vector signed long long vec_nand(vector signed long long, vector bool long long)
vector signed long long vec_nand(vector signed long long, vector signed long long)
vector unsigned long long vec_nand(vector bool long long, vector unsigned long long)
vector unsigned long long vec_nand(vector unsigned long long, vector bool long long)
vector unsigned long long vec_nand(vector unsigned long long, vector unsigned long long)
vector signed char vec_orc(vector bool signed char, vector signed char)
vector signed char vec_orc(vector signed char, vector bool signed char)
vector signed char vec_orc(vector signed char, vector signed char)
vector unsigned char vec_orc(vector bool unsigned char, vector unsigned char)
vector unsigned char vec_orc(vector unsigned char, vector bool unsigned char)
vector unsigned char vec_orc(vector unsigned char, vector unsigned char)
vector short vec_orc(vector bool short, vector short)
vector short vec_orc(vector short, vector bool short)
vector short vec_orc(vector short, vector short)
vector unsigned short vec_orc(vector bool unsigned short, vector unsigned short)
vector unsigned short vec_orc(vector unsigned short, vector bool unsigned short)
vector unsigned short vec_orc(vector unsigned short, vector unsigned short)
vector int vec_orc(vector bool int, vector int)
vector int vec_orc(vector int, vector bool int)
vector int vec_orc(vector int, vector int)
vector unsigned int vec_orc(vector bool unsigned int, vector unsigned int)
vector unsigned int vec_orc(vector unsigned int, vector bool unsigned int)
vector unsigned int vec_orc(vector unsigned int, vector unsigned int)
vector signed long long vec_orc(vector bool long long, vector signed long long)
vector signed long long vec_orc(vector signed long long, vector bool long long)
vector signed long long vec_orc(vector signed long long, vector signed long long)
vector unsigned long long vec_orc(vector bool long long, vector unsigned long long)
vector unsigned long long vec_orc(vector unsigned long long, vector bool long long)
vector unsigned long long vec_orc(vector unsigned long long, vector unsigned long long)
vector signed char vec_div(vector signed char, vector signed char)
vector unsigned char vec_div(vector unsigned char, vector unsigned char)
vector signed short vec_div(vector signed short, vector signed short)
vector unsigned short vec_div(vector unsigned short, vector unsigned short)
vector signed int vec_div(vector signed int, vector signed int)
vector unsigned int vec_div(vector unsigned int, vector unsigned int)
vector signed long long vec_div(vector signed long long, vector signed long long)
vector unsigned long long vec_div(vector unsigned long long, vector unsigned long long)
vector unsigned char vec_mul(vector unsigned char, vector unsigned char)
vector unsigned int vec_mul(vector unsigned int, vector unsigned int)
vector unsigned long long vec_mul(vector unsigned long long, vector unsigned long long)
vector unsigned short vec_mul(vector unsigned short, vector unsigned short)
vector signed char vec_mul(vector signed char, vector signed char)
vector signed int vec_mul(vector signed int, vector signed int)
vector signed long long vec_mul(vector signed long long, vector signed long long)
vector signed short vec_mul(vector signed short, vector signed short)
vector signed long long vec_mergeh(vector signed long long, vector signed long long)
vector signed long long vec_mergeh(vector signed long long, vector bool long long)
vector signed long long vec_mergeh(vector bool long long, vector signed long long)
vector unsigned long long vec_mergeh(vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_mergeh(vector unsigned long long, vector bool long long)
vector unsigned long long vec_mergeh(vector bool long long, vector unsigned long long)
vector double vec_mergeh(vector double, vector double)
vector double vec_mergeh(vector double, vector bool long long)
vector double vec_mergeh(vector bool long long, vector double)
vector signed long long vec_mergel(vector signed long long, vector signed long long)
vector signed long long vec_mergel(vector signed long long, vector bool long long)
vector signed long long vec_mergel(vector bool long long, vector signed long long)
vector unsigned long long vec_mergel(vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_mergel(vector unsigned long long, vector bool long long)
vector unsigned long long vec_mergel(vector bool long long, vector unsigned long long)
vector double vec_mergel(vector double, vector double)
vector double vec_mergel(vector double, vector bool long long)
vector double vec_mergel(vector bool long long, vector double)
vector signed int vec_pack(vector signed long long, vector signed long long)
vector unsigned int vec_pack(vector unsigned long long, vector unsigned long long)
vector bool int vec_pack(vector bool long long, vector bool long long)

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

9 years agoRely on default zero-arg value for IRBuilder::CreateCall calls to zero-arg functions
David Blaikie [Tue, 14 Jul 2015 17:27:39 +0000 (17:27 +0000)]
Rely on default zero-arg value for IRBuilder::CreateCall calls to zero-arg functions

Patch by servuswiegehtz at yahoo.de

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

9 years agoAST Matchers: pass ast_type_traits::DynTypedNode by const-ref
Hans Wennborg [Tue, 14 Jul 2015 16:50:14 +0000 (16:50 +0000)]
AST Matchers: pass ast_type_traits::DynTypedNode by const-ref

(Broken out from http://reviews.llvm.org/D11168)

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

9 years agoPull trivial SanitizerSet methods into the header.
Benjamin Kramer [Tue, 14 Jul 2015 15:34:19 +0000 (15:34 +0000)]
Pull trivial SanitizerSet methods into the header.

Inlining them is always preferable to a call. NFC.

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

9 years agoSupport mingw-w64 toolchain on openSUSE and likely other Linuxes
Yaron Keren [Tue, 14 Jul 2015 15:02:09 +0000 (15:02 +0000)]
Support mingw-w64 toolchain on openSUSE and likely other Linuxes

Thanks to Ismail Donmez for testing and to Joerg Sonnenbergerþ for his comments.

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

9 years ago[x86] add 2 bit to ObjCOrBuiltinID and new intrinsics
Asaf Badouh [Tue, 14 Jul 2015 14:02:45 +0000 (14:02 +0000)]
[x86] add 2 bit to ObjCOrBuiltinID and new intrinsics

add 2 bit to ObjCOrBuiltinID (changed from 11bits to 13bits), see discussion in
Add new intrinsics support that already covered by the BE.
All the intrinsics are covered by tests

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

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

9 years ago[Analyzer] Move FindSuperCallVisitor into an anonymous namespace.
Benjamin Kramer [Tue, 14 Jul 2015 12:37:59 +0000 (12:37 +0000)]
[Analyzer] Move FindSuperCallVisitor into an anonymous namespace.

No functionality change.

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

9 years agoclang-format: Fix formatting of multiple lambdas in initializers.
Daniel Jasper [Tue, 14 Jul 2015 11:26:14 +0000 (11:26 +0000)]
clang-format: Fix formatting of multiple lambdas in initializers.

Before:
  SomeFunction({[&] {
    // comment
  },
                [&] {
                  // comment
                }});

After:
  SomeFunction({[&] {
                  // comment
                },
                [&] {
                  // comment
                }});

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

9 years ago[OPENMP] Drop type qualifiers from private variables.
Alexey Bataev [Tue, 14 Jul 2015 10:32:29 +0000 (10:32 +0000)]
[OPENMP] Drop type qualifiers from private variables.

If the variable is marked as private in OpenMP construct, the reference to this variable should not keep type qualifiers for the original variable. Private copy is not volatile or constant, so we can use unqualified type for private copy.

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

9 years agoClasses inside lambdas are local not nested.
Serge Pavlov [Tue, 14 Jul 2015 10:02:10 +0000 (10:02 +0000)]
Classes inside lambdas are local not nested.

If a lambda used as default argument in a method declaration contained
a local class, that class was incorrectly recognized as nested class.
In this case compiler tried to postpone parsing of this class until
the enclosing class is finished, which caused crashes in some cases.

This change fixes PR13987.

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

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

9 years agoTweak clang/test/PCH/chain-openmp-threadprivate.cpp to satisfy i686-win32.
NAKAMURA Takumi [Tue, 14 Jul 2015 09:45:28 +0000 (09:45 +0000)]
Tweak clang/test/PCH/chain-openmp-threadprivate.cpp to satisfy i686-win32.

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

9 years agoFix for clang memcpyizer bugs 23911 and 23924 (patch by Denis Zobnin)
Alexey Bataev [Tue, 14 Jul 2015 07:55:48 +0000 (07:55 +0000)]
Fix for clang memcpyizer bugs 23911 and 23924 (patch by Denis Zobnin)

The fix is to remove duplicate copy-initialization of the only memcpy-able struct member and to correct the address of aggregately initialized members in destructors' calls during stack unwinding (in order to obtain address of struct member by using GEP instead of 'bitcast').
Differential Revision: http://reviews.llvm.org/D10990

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

9 years agoFix test for Visual C++ link.exe.
Yaron Keren [Tue, 14 Jul 2015 06:01:14 +0000 (06:01 +0000)]
Fix test for Visual C++ link.exe.

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

9 years agoFix test for Visual C++.
Yaron Keren [Tue, 14 Jul 2015 05:58:56 +0000 (05:58 +0000)]
Fix test for Visual C++.

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

9 years agoAdd support for -fuse-ld= in the mingw toolchain driver.
Yaron Keren [Tue, 14 Jul 2015 05:23:34 +0000 (05:23 +0000)]
Add support for -fuse-ld= in the mingw toolchain driver.
We will still default to ld until such a time lld become a
stable release. lld supports arm NT under the machine name "thumb2pe".

http://reviews.llvm.org/D11088

Patch by Martell Malone
Reviewed by Reid Kleckner

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

9 years agoMark clang/test/PCH/chain-openmp-threadprivate.cpp as REQUIRES:tls.
NAKAMURA Takumi [Tue, 14 Jul 2015 04:00:18 +0000 (04:00 +0000)]
Mark clang/test/PCH/chain-openmp-threadprivate.cpp as REQUIRES:tls.

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

9 years agoclang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin.
NAKAMURA Takumi [Tue, 14 Jul 2015 03:57:11 +0000 (03:57 +0000)]
clang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin.

Thread local storage is not implemented for targeting cygwin.

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

9 years agoAdd file missed from r242105.
Richard Smith [Tue, 14 Jul 2015 02:40:33 +0000 (02:40 +0000)]
Add file missed from r242105.

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

9 years ago[modules] When diagnosing errors in module map files found by 'extern module' declara...
Richard Smith [Tue, 14 Jul 2015 02:06:01 +0000 (02:06 +0000)]
[modules] When diagnosing errors in module map files found by 'extern module' declarations, show how we got to that module map file.

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

9 years agoRemove a completely redundant initialization of llvm::TimePassesIsEnabled,
Adrian Prantl [Tue, 14 Jul 2015 01:04:40 +0000 (01:04 +0000)]
Remove a completely redundant initialization of llvm::TimePassesIsEnabled,
which is actually the variable backing up the llvm -time-passes command
line argument.
llvm::TimePassesIsEnabled is actually being initialized in CodeGenAction.

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

9 years agoBasic code generation for MSan use-after-dtor.
Evgeniy Stepanov [Tue, 14 Jul 2015 00:34:50 +0000 (00:34 +0000)]
Basic code generation for MSan use-after-dtor.

Under the -fsanitize-memory-use-after-dtor (disabled by default) insert
an MSan runtime library call at the end of every destructor.

Patch by Naomi Musgrave.

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

9 years agoExtend -ftime-report to give more information about time spent reading module files.
Richard Smith [Tue, 14 Jul 2015 00:26:00 +0000 (00:26 +0000)]
Extend -ftime-report to give more information about time spent reading module files.

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

9 years ago[OpenMP] Add REQUIRES pragma to threadprivate regression tests.
Samuel Antao [Tue, 14 Jul 2015 00:09:50 +0000 (00:09 +0000)]
[OpenMP] Add REQUIRES pragma to threadprivate regression tests.

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

9 years ago[Intrin.h] Use __ATOMIC_SEQ_CST instead of '5'
David Majnemer [Mon, 13 Jul 2015 23:39:37 +0000 (23:39 +0000)]
[Intrin.h] Use __ATOMIC_SEQ_CST instead of '5'

No functionality change is intended.

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

9 years ago[Intrin.h] Make the variable names more consistent
David Majnemer [Mon, 13 Jul 2015 23:38:56 +0000 (23:38 +0000)]
[Intrin.h] Make the variable names more consistent

No functionality change intended.

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

9 years ago[cuda] Driver changes to compile and stitch together host and device-side CUDA code.
Artem Belevich [Mon, 13 Jul 2015 23:27:56 +0000 (23:27 +0000)]
[cuda] Driver changes to compile and stitch together host and device-side CUDA code.

  NOTE: reverts r242077 to reinstate r242058, r242065, 242067
        and includes fix for OS X test failures.

  - Changed driver pipeline to compile host and device side of CUDA
    files and incorporate results of device-side compilation into host
    object file.

  - Added a test for cuda pipeline creation in clang driver.

  New clang options:
  --cuda-host-only   - Do host-side compilation only.
  --cuda-device-only - Do device-side compilation only.

  --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
    compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
    than once in which case one device-compilation will be done per
    unique specified GPU architecture.

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

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

9 years ago[OpenMP] Add TLS-based implementation for threadprivate directive.
Samuel Antao [Mon, 13 Jul 2015 22:54:53 +0000 (22:54 +0000)]
[OpenMP] Add TLS-based implementation for threadprivate directive.

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

9 years agoThis reverts commit r242058, r242065, r242067.
Rafael Espindola [Mon, 13 Jul 2015 22:26:30 +0000 (22:26 +0000)]
This reverts commit r242058,  r242065,  r242067.

The tests were failing on OS X.

Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code."
Revert "Fixed regex to properly match '64' in the test case."
Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least."

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

9 years agoclang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least.
NAKAMURA Takumi [Mon, 13 Jul 2015 21:18:53 +0000 (21:18 +0000)]
clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least.

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

9 years agoFixed regex to properly match '64' in the test case.
Artem Belevich [Mon, 13 Jul 2015 20:49:50 +0000 (20:49 +0000)]
Fixed regex to properly match '64' in the test case.

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

9 years agoMove class into an anonymous namespace. NFC.
Benjamin Kramer [Mon, 13 Jul 2015 20:42:13 +0000 (20:42 +0000)]
Move class into an anonymous namespace. NFC.

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

9 years ago[cuda] Driver changes to compile and stitch together host and device-side CUDA code.
Artem Belevich [Mon, 13 Jul 2015 20:21:06 +0000 (20:21 +0000)]
[cuda] Driver changes to compile and stitch together host and device-side CUDA code.

  - Changed driver pipeline to compile host and device side of CUDA
    files and incorporate results of device-side compilation into host
    object file.

  - Added a test for cuda pipeline creation in clang driver.

  New clang options:
  --cuda-host-only   - Do host-side compilation only.
  --cuda-device-only - Do device-side compilation only.

  --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
    compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
    than once in which case one device-compilation will be done per
    unique specified GPU architecture.

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

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

9 years ago[Modules] Allow missing header before a missing requirement
Ben Langmuir [Mon, 13 Jul 2015 19:48:52 +0000 (19:48 +0000)]
[Modules] Allow missing header before a missing requirement

And make the module unavailable without breaking any parent modules.

If there's a missing requirement after we've already seen a missing
header, still update the IsMissingRequiement bit correctly.  Also,
diagnose missing requirements before missing headers, since the
existence of the header is moot if there are missing requirements.

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

9 years agoclang-cl: For files setting output names, mention which flags they belong to.
Nico Weber [Mon, 13 Jul 2015 18:54:56 +0000 (18:54 +0000)]
clang-cl: For files setting output names, mention which flags they belong to.

It always takes me a while to figure out how to say "preprocess to file
foo.txt" with clang-cl. With this, it might be easier.
http://reviews.llvm.org/D10890

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

9 years agoUpdate documentation for unroll pragmas on loops with runtime trip counts.
Mark Heffernan [Mon, 13 Jul 2015 18:31:37 +0000 (18:31 +0000)]
Update documentation for unroll pragmas on loops with runtime trip counts.

This change updates the documentation for the loop unrolling pragma behavior
change in r242047. Specifically, with that change "#pragma unroll" will not
unroll loops with a runtime trip count.

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

9 years agoclang-format: Print token type name instead of number in -debug output
Birunthan Mohanathas [Mon, 13 Jul 2015 16:19:34 +0000 (16:19 +0000)]
clang-format: Print token type name instead of number in -debug output

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

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

9 years agoSupport alternate attribute spelling __enable_if__
Ulrich Weigand [Mon, 13 Jul 2015 14:13:01 +0000 (14:13 +0000)]
Support alternate attribute spelling __enable_if__

Attribute names usually support an alternate spelling that uses double
underscores before and after the attribute name, like e.g. attribute
((__aligned__)) for attribute ((aligned)). This is necessary to allow
use of attributes in system headers without polluting the name space.

However, for attribute ((enable_if)) that alternate spelling does not
work correctly. This is because of code in Parser::ParseGNUAttributeArgs
(ParseDecl.cpp) that specifically checks for the "enable_if" spelling
without allowing the alternate spelling.

Similar code in ParseDecl.cpp uses the normalizeAttrName helper to allow
both spellings. This patch adds use of that helper for the "enable_if"
check as well, which fixes attribute ((__enable_if__)).

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

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

9 years agoUpdate comment
Ulrich Weigand [Mon, 13 Jul 2015 11:52:14 +0000 (11:52 +0000)]
Update comment

As noticed by David Majnemer, update an out-of-date comment in
CGClass.cpp after the r241916 commit.

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

9 years agoSet the linkage before setting the visibility.
Rafael Espindola [Mon, 13 Jul 2015 06:07:58 +0000 (06:07 +0000)]
Set the linkage before setting the visibility.

Otherwise the visibility setting code would not know that a given
function was available_externally.

Fixes PR24097.

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

9 years agoIntrin.h: Don't invade the program's namespace
David Majnemer [Mon, 13 Jul 2015 02:53:23 +0000 (02:53 +0000)]
Intrin.h: Don't invade the program's namespace

The program is permitted to have stuff like '#define x' in it so avoid
using identifiers not reserved for the implementation.

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