]> granicus.if.org Git - clang/log
clang
8 years ago[analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as...
Devin Coughlin [Fri, 20 Nov 2015 01:53:44 +0000 (01:53 +0000)]
[analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

The analyzer currently reports dead store false positives when a local variable
is captured by reference in a C++ lambda.

For example:

  int local = 0; auto lambda = [&local]() {
    local++;
  };
  local = 7; // False Positive: Value stored to 'local' is never read
  lambda();

In this case, the assignment setting `local` to 7 is not a dead store because
the called lambda will later read that assigned value.

This commit silences this source of false positives by treating locals captured
by reference in C++ lambdas as escaped, similarly to how the DeadStoresChecker
deals with locals whose address is taken.

rdar://problem/22165179

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

8 years agoSupport CMake's clang_rt.profile library naming scheme
Chris Bieneman [Fri, 20 Nov 2015 00:19:21 +0000 (00:19 +0000)]
Support CMake's clang_rt.profile library naming scheme

Summary: This code is a bit undesirable, but it gets clang to work with the autoconf and cmake-built libclang_rt.profile libraries.

Reviewers: bogner

Subscribers: cfe-commits

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

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

8 years agoAMDGPU: Add support for 's' and 'v' asm constraints
Tom Stellard [Thu, 19 Nov 2015 22:11:58 +0000 (22:11 +0000)]
AMDGPU: Add support for 's' and 'v' asm constraints

Summary: 's' is used to specify sgprs and 'v' is used to specify vgprs.

Reviewers: arsenm, echristo

Subscribers: cfe-commits

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

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

8 years agoUpdate clang tests to accomendate discriminator changes.
Dehao Chen [Thu, 19 Nov 2015 19:53:16 +0000 (19:53 +0000)]
Update clang tests to accomendate discriminator changes.

Summary: The discriminator change in http://reviews.llvm.org/D14738 will fail these clang tests. Update the test to accomendate the discriminator change.

Reviewers: dblaikie, davidxl, dnovillo

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

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

8 years agoChange the expression evaluation context from Unevaluated to ConstantEvaluated while...
Faisal Vali [Thu, 19 Nov 2015 19:20:17 +0000 (19:20 +0000)]
Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults.

Also address a typo from a prior patch that performed a similar fix during Parsing of default non-type template arguments.  I left the RAII ExpressionEvaluationContext variable Name as Unevaluated though we had switched the context to ConstantEvaluated.

There should be no functionality change here - since when expression evaluation context is popped off, for the most part these two contexts currently behave similarly in regards to lambda diagnostics and odr-use tracking.

Like its parsing counterpart, this patch presages the advent of constexpr lambda patches...

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

8 years agoclang-cl: Make /W4 imply -Wall -Wextra (PR25563)
Hans Wennborg [Thu, 19 Nov 2015 17:49:59 +0000 (17:49 +0000)]
clang-cl: Make /W4 imply -Wall -Wextra (PR25563)

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

8 years agoclangFrontend: [PR25565] Quick fix for dependencies on Attributes.inc.
NAKAMURA Takumi [Thu, 19 Nov 2015 10:59:48 +0000 (10:59 +0000)]
clangFrontend: [PR25565] Quick fix for dependencies on Attributes.inc.

FIXME: Attributes.inc may be an independent target.

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

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

8 years agoPR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Alexey Bataev [Thu, 19 Nov 2015 10:13:11 +0000 (10:13 +0000)]
PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Add support for vector mode attributes like "attribute((mode(V4SF)))". Also add warning about deprecated vector modes like GCC does.
Differential Revision: http://reviews.llvm.org/D14744

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

8 years agoRevert "Change memcpy/memset/memmove to have dest and source alignments."
Pete Cooper [Thu, 19 Nov 2015 05:55:59 +0000 (05:55 +0000)]
Revert "Change memcpy/memset/memmove to have dest and source alignments."

This reverts commit r253512.

This likely broke the bots in:
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

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

8 years agoRevert "Fix debian build after r253512."
Pete Cooper [Thu, 19 Nov 2015 05:55:44 +0000 (05:55 +0000)]
Revert "Fix debian build after r253512."

This reverts commit r253519.

This likely broke the bots in
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

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

8 years ago[coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_...
Richard Smith [Thu, 19 Nov 2015 02:36:35 +0000 (02:36 +0000)]
[coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits.

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

8 years agoDon't actually add the __unsafe_unretained qualifier in MRC;
John McCall [Thu, 19 Nov 2015 02:28:03 +0000 (02:28 +0000)]
Don't actually add the __unsafe_unretained qualifier in MRC;
driving a canonical difference between that and an unqualified
type is a really bad idea when both are valid.  Instead, remember
that it was there in a non-canonical way, then look for that in
the one place we really care about it: block captures.  The net
effect closely resembles the behavior of a decl attribute, except
still closely following ARC's standard qualifier parsing rules.

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

8 years agoFix the emission of ARC-style ivar layouts in the fragile runtime
John McCall [Thu, 19 Nov 2015 02:27:55 +0000 (02:27 +0000)]
Fix the emission of ARC-style ivar layouts in the fragile runtime
to start at the offset of the first ivar instead of the rounded-up
end of the superclass.  The latter could include a large amount of
tail padding because of a highly-aligned ivar, and subclass ivars
can be laid out within that.

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

8 years ago[analyzer] Improve modeling of static initializers.
Anna Zaks [Thu, 19 Nov 2015 01:25:28 +0000 (01:25 +0000)]
[analyzer] Improve modeling of static initializers.

Conversions between unrelated pointer types (e.g. char * and void *) involve
bitcasts which were not properly modeled in case of static initializers. The
patch fixes this problem.

The problem was originally spotted by Artem Dergachev. Patched by Yuri Gribov!

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

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

8 years ago[MS ABI] Let arbitrary entities participate in vftable ordering
David Majnemer [Thu, 19 Nov 2015 00:03:54 +0000 (00:03 +0000)]
[MS ABI] Let arbitrary entities participate in vftable ordering

In the Microsoft ABI, the vftable is laid out in the order in the
declaration order of the entities defined within it.

Obviously, only virtual methods end up in the vftable but they will be
placed into the table at the same position as the first entity with the
same name.

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

8 years agoFix debian build after r253512.
Pete Cooper [Wed, 18 Nov 2015 22:53:40 +0000 (22:53 +0000)]
Fix debian build after r253512.

The conversion from QuantityType to the (temporary) IntegerAlignment class
was ambiguous.

For now add in explicit conversion to unsigned to satisfy the clang-x86_64-debian-fast bot.

I'll remove the explicit conversion when I remove the IntegerAlignment class.

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

8 years ago[analyzer] Skip checking blocks in dependent contexts.
Devin Coughlin [Wed, 18 Nov 2015 22:46:52 +0000 (22:46 +0000)]
[analyzer] Skip checking blocks in dependent contexts.

Since we don't check functions in dependent contexts, we should skip blocks
in those contexts as well. This avoids an assertion failure when the
DeadStoresChecker attempts to evaluate an array subscript expression with
a dependent name type.

rdar://problem/23564220

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

8 years agoChange memcpy/memset/memmove to have dest and source alignments.
Pete Cooper [Wed, 18 Nov 2015 22:18:45 +0000 (22:18 +0000)]
Change memcpy/memset/memmove to have dest and source alignments.

This is a follow on from a similar LLVM commit: r253511.

Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

These intrinsics currently have an explicit alignment argument which is
required to be a constant integer.  It represents the alignment of the
source and dest, and so must be the minimum of those.

This change allows source and dest to each have their own alignments
by using the alignment attribute on their arguments.  The alignment
argument itself is removed.

The only code change to clang is hidden in CGBuilder.h which now passes
both dest and source alignment to IRBuilder, instead of taking the minimum of
dest and source alignments.

Reviewed by Hal Finkel.

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

8 years ago[MSVC Compat] Make -Wmicrosoft-cast not an error by default
David Majnemer [Wed, 18 Nov 2015 21:42:38 +0000 (21:42 +0000)]
[MSVC Compat] Make -Wmicrosoft-cast not an error by default

Too much code is sloppy about this to error by default.

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

8 years ago[Sema] Don't work around a malformed AST
David Majnemer [Wed, 18 Nov 2015 19:49:19 +0000 (19:49 +0000)]
[Sema] Don't work around a malformed AST

We created a malformed TemplateSpecializationType: it was dependent but
had a RecordType as it's canonical type.  This would lead getAs to
crash.  r249090 worked around this but we should fix this for real by
providing a more appropriate template specialization type as the
canonical type.

This fixes PR24246.

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

8 years agoRemoving the AST matcher test for thread_local storage duration. Not all platforms...
Aaron Ballman [Wed, 18 Nov 2015 18:37:29 +0000 (18:37 +0000)]
Removing the AST matcher test for thread_local storage duration. Not all platforms support TLS, and on platforms that do not support it, use of thread_local causes an error. Since there's no way to determine whether the testing platform supports TLS, there's no way to know whether the test is safe to run or not. I will explore ways to enable this test, but this will appease at least one more build bot.

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

8 years ago[PGO] Test update for revision 253484.
Betul Buyukkurt [Wed, 18 Nov 2015 18:15:55 +0000 (18:15 +0000)]
[PGO] Test update for revision 253484.

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

8 years agoRe-committing r253473 after hopefully fixing the bot breakage. There was a copy-pasta...
Aaron Ballman [Wed, 18 Nov 2015 17:56:55 +0000 (17:56 +0000)]
Re-committing r253473 after hopefully fixing the bot breakage. There was a copy-pasta issue that my local testing did not catch.

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

8 years ago[Myriad]: fix test for Windows
Douglas Katzman [Wed, 18 Nov 2015 17:19:47 +0000 (17:19 +0000)]
[Myriad]: fix test for Windows

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

8 years agoReverting r253473 while I investigate build bot failures.
Aaron Ballman [Wed, 18 Nov 2015 17:16:01 +0000 (17:16 +0000)]
Reverting r253473 while I investigate build bot failures.

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

8 years agoAdding AST matchers for VarDecl storage durations. Can now determine whether a VarDec...
Aaron Ballman [Wed, 18 Nov 2015 17:05:39 +0000 (17:05 +0000)]
Adding AST matchers for VarDecl storage durations. Can now determine whether a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers, which appear to be missing some previous additions.

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

8 years ago[ARM] Support +feature targeting in -mcpu/-march
Bradley Smith [Wed, 18 Nov 2015 16:33:48 +0000 (16:33 +0000)]
[ARM] Support +feature targeting in -mcpu/-march

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

8 years ago[Myriad]: insert -L paths into linker cmd only when they exist.
Douglas Katzman [Wed, 18 Nov 2015 16:24:46 +0000 (16:24 +0000)]
[Myriad]: insert -L paths into linker cmd only when they exist.

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

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

8 years ago[libclang] Add entry points that take a full command line including argv[0].
Benjamin Kramer [Wed, 18 Nov 2015 16:14:27 +0000 (16:14 +0000)]
[libclang] Add entry points that take a full command line including argv[0].

This provides both a more uniform interface and makes libclang behave like
clang tooling wrt relative paths against argv[0]. This is necessary for
finding paths to a c++ standard library relative to a clang binary given
in a compilation database. It can also be used to find paths relative to
libclang.so if the full path to it is passed in.

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

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

8 years agoFix tests in order for them to not fail after r252604.
Igor Laevsky [Wed, 18 Nov 2015 14:40:41 +0000 (14:40 +0000)]
Fix tests in order for them to not fail after r252604.

Some expected attributes appear to be incorrect after
optimizations are run and llvm will strip them. Use -O0
so that llvm will not have a chance to remove them.

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

8 years agoSet flag for lldb when qualified name lookup is being done
Eugene Leviant [Wed, 18 Nov 2015 12:48:05 +0000 (12:48 +0000)]
Set flag for lldb when qualified name lookup is being done

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

8 years agoUpdate for llvm change.
Rafael Espindola [Wed, 18 Nov 2015 06:54:13 +0000 (06:54 +0000)]
Update for llvm change.

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

8 years agoBuildUniversalActions(): Prune obsolete \param(s). [-Wdocumentation]
NAKAMURA Takumi [Wed, 18 Nov 2015 05:15:21 +0000 (05:15 +0000)]
BuildUniversalActions(): Prune obsolete \param(s). [-Wdocumentation]

FIXME: Describe BAInputs.

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

8 years ago[NFC] Change the evaluation context of a non-type default template argument from...
Faisal Vali [Wed, 18 Nov 2015 04:29:22 +0000 (04:29 +0000)]
[NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated.

This patch emits a more appropriate (but still noisy) diagnostic stream when a lambda-expression is encountered within a non-type default argument.

For e.g. template<int N = ([] { return 5; }())> int f();

As opposed to complaining that a lambda expression is not allowed in an unevaluated operand, the patch complains about the lambda being forbidden in a constant expression context (which will be allowed in C++17 now that they have been accepted by EWG, unless of course CWG or national bodies (that have so far shown no signs of concern) rise in protest)

As I start submitting patches for constexpr lambdas (http://wg21.link/P0170R0) under C++1z (OK'd by Richard Smith at Kona), this will be one less change to make.

Thanks!

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

8 years agoDon't expose iterators into the list of types on the ASTContext; these are
Richard Smith [Wed, 18 Nov 2015 01:19:02 +0000 (01:19 +0000)]
Don't expose iterators into the list of types on the ASTContext; these are
unsafe, since many operations on the types can trigger lazy deserialization of
more types and invalidate the iterators. This fixes a crasher, but I've not
been able to reduce it to a reasonable testcase yet.

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

8 years agoTry to fix leak in CXStringSet from r252853
Reid Kleckner [Wed, 18 Nov 2015 01:06:39 +0000 (01:06 +0000)]
Try to fix leak in CXStringSet from r252853

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

8 years agoFix for use-after-free which caused test failure in cuda-detect.cu.
Artem Belevich [Wed, 18 Nov 2015 00:37:41 +0000 (00:37 +0000)]
Fix for use-after-free which caused test failure in cuda-detect.cu.

Return std::string itself instead StringRef to a temporary std::string.

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

8 years agoProduce a better diagnostic for global register variables.
Akira Hatanaka [Wed, 18 Nov 2015 00:15:28 +0000 (00:15 +0000)]
Produce a better diagnostic for global register variables.

Currently, when there is a global register variable in a program that
is bound to an invalid register, clang/llvm prints an error message that
is not very user-friendly.

This commit improves the diagnostic and moves the check that used to be
in the backend to Sema. In addition, it makes changes to error out if
the size of the register doesn't match the declared variable size.

e.g., volatile register int B asm ("rbp");

rdar://problem/23084219

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

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

8 years ago[PGO] Removed unused code. [NFC]
Betul Buyukkurt [Wed, 18 Nov 2015 00:14:08 +0000 (00:14 +0000)]
[PGO] Removed unused code. [NFC]

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

8 years ago[modules] When a #include is mapped to a module import and appears somewhere
Richard Smith [Tue, 17 Nov 2015 23:32:01 +0000 (23:32 +0000)]
[modules] When a #include is mapped to a module import and appears somewhere
other than the top level, we issue an error. This breaks a fair amount of C++
code wrapping C libraries, where the C library is #included within a namespace
/ extern "C" combination, because the C library (probably) includes C++
standard library headers which may be within modules.

Without modules, this setup is harmless if (and *only* if) the corresponding
standard library module was already included outside the namespace, so
downgrade the error to a default-error extension in that case, so that it can
be selectively disabled for such misbehaving libraries.

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

8 years ago[Myriad]: -nostdlib implies -nostartfiles
Douglas Katzman [Tue, 17 Nov 2015 22:33:34 +0000 (22:33 +0000)]
[Myriad]: -nostdlib implies -nostartfiles

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

8 years ago[CUDA] Make CUDA compilation usable by default.
Artem Belevich [Tue, 17 Nov 2015 22:28:55 +0000 (22:28 +0000)]
[CUDA] Make CUDA compilation usable by default.

Currently clang requires several additional command
line options in order to enable new features needed
during CUDA compilation. This patch makes these
options default.

* Automatically include cuda_runtime.h if we've found
  a valid CUDA installation.
* Disable automatic CUDA header inclusion during unit tests.
* Added test case for command line construction.
* Enabled target overloads and relaxed call checks that are
  needed in order to include CUDA headers.
* Added CUDA-7.5 installation path to the CUDA installation search list.
* Define __CUDA__ macro to indicate CUDA compilation.

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

8 years ago[CUDA] Added a wrapper header for inclusion of stock CUDA headers.
Artem Belevich [Tue, 17 Nov 2015 22:28:52 +0000 (22:28 +0000)]
[CUDA] Added a wrapper header for inclusion of stock CUDA headers.

Header files that come with CUDA are assuming split host/device
compilation and are not usable by clang out of the box.
With a bit of preprocessor magic it's possible to twist them
into something clang can use.

This wrapper always includes CUDA headers exactly the same way during
host and device compilation passes and produces identical preprocessed
content during host and device side compilation for sm_35 GPUs. Device
compilation passes for older GPUs will see a smaller subset of device
functions supported by particular GPU.

The wrapper assumes specific contents of CUDA header files and works
only with CUDA 7.0 and 7.5.

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

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

8 years ago[CUDA] Detect and link with CUDA's libdevice bitcode library.
Artem Belevich [Tue, 17 Nov 2015 22:28:50 +0000 (22:28 +0000)]
[CUDA] Detect and link with CUDA's libdevice bitcode library.

- added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for.
- pass additional cc1 options for linking with detected libdevice bitcode
- added -nocudalib to prevent automatic linking with libdevice
- added test cases to verify new functionality

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

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

8 years ago[CUDA] added include paths for both sides of CUDA compilation.
Artem Belevich [Tue, 17 Nov 2015 22:28:46 +0000 (22:28 +0000)]
[CUDA] added include paths for both sides of CUDA compilation.

In order to compile a CUDA file clang must be able to find
include files for both both host and device.

This patch passes AuxToolchain to AddPreprocessingOptions and
uses it to add include paths for the opposite side of compilation.

We also must be able to find CUDA include files. If the driver
found CUDA installation, it adds appropriate include path
to CUDA headers. This can be disabled with '-nocudainc'.

- Added include paths for the opposite side of compilation.
- Added include paths to detected CUDA installation.
- Added -nocudainc to prevent adding CUDA include path.
- Added test cases to verify new functionality.

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

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

8 years ago[CUDA] use -aux-triple to pass target triple of opposite side of compilation
Artem Belevich [Tue, 17 Nov 2015 22:28:40 +0000 (22:28 +0000)]
[CUDA] use -aux-triple to pass target triple of opposite side of compilation

Clang needs to know target triple for both sides of compilation so that
preprocessor macros and target builtins from both sides are available.

This change augments Compilation class to carry information about
toolchains used during different CUDA compilation passes and refactors
BuildActions to use it when it constructs CUDA jobs.

Removed DeviceTriple from CudaHostAction/CudaDeviceAction as it's no
longer needed.

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

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

8 years agoUse !hasArg with two options instead of !hasArg && !hasArg.
Douglas Katzman [Tue, 17 Nov 2015 20:28:07 +0000 (20:28 +0000)]
Use !hasArg with two options instead of !hasArg && !hasArg.

Thereby fixing a warning about failure to claim all args.

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

8 years ago[Lit Test] Updated 34 Lit tests to be C++11 compatible.
Charles Li [Tue, 17 Nov 2015 20:25:05 +0000 (20:25 +0000)]
[Lit Test] Updated 34 Lit tests to be C++11 compatible.

Added expected diagnostics new to C++11.
Expanded RUN line to: default, C++98/03 and C++11.

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

8 years agobmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targets
Hans Wennborg [Tue, 17 Nov 2015 18:46:48 +0000 (18:46 +0000)]
bmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targets

The tzcnt intrinsics are used non non-BMI targets by code (e.g. ffmpeg)
that uses it as a potentially faster BSF.

The TZCNT instruction is special in that it's encoded in a
backward-compatible way and behaves as BSF on non-BMI targets.

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

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

8 years agoARM: fix mismatch between Clang and backend on exception type.
Tim Northover [Tue, 17 Nov 2015 18:27:27 +0000 (18:27 +0000)]
ARM: fix mismatch between Clang and backend on exception type.

"-arch armv7k" is only normally used with a watchos target, but Clang doesn't
stop you from giving a "-miphoneos-version-min" option too, converting the
triple to "thumbv7k-apple-ios". In this case the backend will decide to use
SjLj exceptions, so Clang needs to agree so it can create the correct
predefines.

Fortunately, there's a handy function to make the decision for us now.

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

8 years agoAdd trivial utility to append -L arguments to linker step. NFC
Douglas Katzman [Tue, 17 Nov 2015 17:41:23 +0000 (17:41 +0000)]
Add trivial utility to append -L arguments to linker step. NFC

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

8 years agoRevert "Make FP_CONTRACT ON the default."
Manuel Klimek [Tue, 17 Nov 2015 15:40:10 +0000 (15:40 +0000)]
Revert "Make FP_CONTRACT ON the default."

This reverts commit r253269.

This leads to assert / segfault triggering on the following reduced example:
float foo(float U, float base, float cell) { return (U = 2 * base) - cell; }

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

8 years ago[Sema] Remove unnecessary typecast of bool to int when passing arguments to diagnosti...
Craig Topper [Tue, 17 Nov 2015 05:40:12 +0000 (05:40 +0000)]
[Sema] Remove unnecessary typecast of bool to int when passing arguments to diagnostics. NFC

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

8 years ago[Sema] Combine similar diagnostics using %select. NFC
Craig Topper [Tue, 17 Nov 2015 05:40:09 +0000 (05:40 +0000)]
[Sema] Combine similar diagnostics using %select. NFC

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

8 years ago[Sema] Minor formatting fixes. NFC
Craig Topper [Tue, 17 Nov 2015 05:40:05 +0000 (05:40 +0000)]
[Sema] Minor formatting fixes. NFC

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

8 years ago[modules] Fix some more cases where we used to reject a conflict between two
Richard Smith [Tue, 17 Nov 2015 03:02:41 +0000 (03:02 +0000)]
[modules] Fix some more cases where we used to reject a conflict between two
declarations that are not simultaneously visible, and where at least one of
them has internal/no linkage.

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

8 years agoMake FP_CONTRACT ON the default.
Stephen Canon [Mon, 16 Nov 2015 23:09:11 +0000 (23:09 +0000)]
Make FP_CONTRACT ON the default.

Differential Revision: D14200

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

8 years agoDerive nacltools::Linker from GnuTool to get response file support
Derek Schuff [Mon, 16 Nov 2015 22:21:25 +0000 (22:21 +0000)]
Derive nacltools::Linker from GnuTool to get response file support

It could be derived from gnutools::Linker directly but this way makes it
consistent with all the other toolchains around it.

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

8 years agoCorrectly handle type mismatches in the __weak copy/move-initialization
John McCall [Mon, 16 Nov 2015 22:11:41 +0000 (22:11 +0000)]
Correctly handle type mismatches in the __weak copy/move-initialization
peephole I added in r250916.

rdar://23559789

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

8 years agoWhen producing error messages for always_inline functions with the
Eric Christopher [Mon, 16 Nov 2015 18:29:59 +0000 (18:29 +0000)]
When producing error messages for always_inline functions with the
target attribute, don't include "negative" subtarget features in the
list of required features. Builtins are positive by default so don't
need this change, but we pull the default list of features from the
command line and so need to make sure that we only include features
that are turned on for code generation in our error.

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

8 years ago[mips] Do not add arch name in the compiler-rt's components.
Vasileios Kalintiris [Mon, 16 Nov 2015 15:41:30 +0000 (15:41 +0000)]
[mips] Do not add arch name in the compiler-rt's components.

Instead, use the constant "mips" since the libraries are already
placed under the multilib's OS suffix.

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

8 years ago[Myriad]: pass the 'std=' option to moviCompile
Douglas Katzman [Mon, 16 Nov 2015 15:38:40 +0000 (15:38 +0000)]
[Myriad]: pass the 'std=' option to moviCompile

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

8 years ago[ARM,AArch64] Fix __rev16l and __rev16ll intrinsics
Oliver Stannard [Mon, 16 Nov 2015 14:58:50 +0000 (14:58 +0000)]
[ARM,AArch64] Fix __rev16l and __rev16ll intrinsics

These two intrinsics are defined in arm_acle.h.

__rev16l needs to rotate by 16 bits, bit it was actually rotating by 2 bits.
For AArch64, where long is 64 bits, this would still be wrong.

__rev16ll was incorrect, it reversed the bytes in each 32-bit word, rather than
each 16-bit halfword. The correct implementation is to apply __rev16 to the top
and bottom words of the 64-bit value.

For AArch32 targets, these get compiled down to the hardware rev16 instruction
at -O1 and above. For AArch64 targets, the 64-bit ones get compiled to two
32-bit rev16 instructions, because there is not currently a pattern for the
64-bit rev16 instruction.

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

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

8 years agoHandle ARMv6KZ naming
Artyom Skrobov [Mon, 16 Nov 2015 14:05:48 +0000 (14:05 +0000)]
Handle ARMv6KZ naming

Summary: Update for clang tests for D14568

Reviewers: rengolin, joerg, bogden

Subscribers: aemerson, rengolin, cfe-commits

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

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

8 years agoclang-format: Enable #include sorting by default.
Daniel Jasper [Mon, 16 Nov 2015 12:38:56 +0000 (12:38 +0000)]
clang-format: Enable #include sorting by default.

This has seen quite some usage and I am not aware of any issues. Also
add a style option to enable/disable include sorting. The existing
command line flag can from now on be used to override whatever is set
in the style.

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

8 years ago[ARM] Pass in the architecture to TargetParser to cope with API change
Bradley Smith [Mon, 16 Nov 2015 11:16:36 +0000 (11:16 +0000)]
[ARM] Pass in the architecture to TargetParser to cope with API change

The TargetParser API to get the default FPU and default extensions has
changed so that it can fall back to the architecture in case of a
generic CPU.

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

8 years agoUpdate for the gnu flavor being renamed to old-gnu.
Rafael Espindola [Mon, 16 Nov 2015 09:12:12 +0000 (09:12 +0000)]
Update for the gnu flavor being renamed to old-gnu.

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

8 years ago[CGDebugInfo] Set the size and align for reference types
Keno Fischer [Mon, 16 Nov 2015 09:04:13 +0000 (09:04 +0000)]
[CGDebugInfo] Set the size and align for reference types

In r253186, I changed the DIBuilder API to now take size and align
for reference types as well. This was done in preparation for upcoming
changes to the Verifier that will validate that sizes match between
DI types and IR values that are declared as having those types.
This updates clang to actually pass the information through.

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

8 years ago[Sema] Implement several unary type traits more accurately
David Majnemer [Mon, 16 Nov 2015 06:58:51 +0000 (06:58 +0000)]
[Sema] Implement several unary type traits more accurately

is_empty, is_polymorphic, and is_abstract didn't handle incomplete types
correctly.  Only non-union class types must be complete for these
traits.

is_final and is_sealed don't care about the particular spelling of the
FinalAttr.

is_interface_class should always return false regardless of its input.
The type trait can only be satisfied in a mode we do not support (/CLR).

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

8 years ago[Basic] Replace vector<bool> with BitVector in SourceManager. NFC.
Vedant Kumar [Mon, 16 Nov 2015 04:39:22 +0000 (04:39 +0000)]
[Basic] Replace vector<bool> with BitVector in SourceManager. NFC.

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

8 years ago[Frontend] Rangify for loop. NFC.
Vedant Kumar [Mon, 16 Nov 2015 00:59:34 +0000 (00:59 +0000)]
[Frontend] Rangify for loop. NFC.

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

8 years ago[Basic] Use a bitfield in SLocEntry for clarity. NFC.
Vedant Kumar [Mon, 16 Nov 2015 00:11:58 +0000 (00:11 +0000)]
[Basic] Use a bitfield in SLocEntry for clarity. NFC.

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

8 years ago[analyzer] Handle calling ObjC super method from inside C++ lambda.
Devin Coughlin [Sun, 15 Nov 2015 17:48:22 +0000 (17:48 +0000)]
[analyzer] Handle calling ObjC super method from inside C++ lambda.

When calling a ObjC method on super from inside a C++ lambda, look at the
captures to find "self". This mirrors how the analyzer handles calling super in
an ObjC block and fixes an assertion failure.

rdar://problem/23550077

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

8 years ago[Sema] Use getLangOpts in Sema instead of Preprocessor. Call getTargetInfo on the...
Craig Topper [Sun, 15 Nov 2015 17:27:57 +0000 (17:27 +0000)]
[Sema] Use getLangOpts in Sema instead of Preprocessor. Call getTargetInfo on the AST context instead of Preprocessor. NFC

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

8 years ago[Sema] Fix filename in header. NFC
Craig Topper [Sun, 15 Nov 2015 17:27:55 +0000 (17:27 +0000)]
[Sema] Fix filename in header. NFC

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

8 years ago[Sema] Remove unnecessary includes and forward declarations. NFC
Craig Topper [Sun, 15 Nov 2015 17:27:52 +0000 (17:27 +0000)]
[Sema] Remove unnecessary includes and forward declarations. NFC

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

8 years ago[X86][MMX] Added MMX IR + assembly codegen builtin tests for some missing cvt intrinsics
Simon Pilgrim [Sun, 15 Nov 2015 14:40:31 +0000 (14:40 +0000)]
[X86][MMX] Added MMX IR + assembly codegen builtin tests for some missing cvt intrinsics

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

8 years ago[libclang] Visit TypeAliasTemplateDecl
Sergey Kalinichev [Sun, 15 Nov 2015 13:48:32 +0000 (13:48 +0000)]
[libclang] Visit TypeAliasTemplateDecl

This makes TypeAliasTemplateDecl accessible via LibClang and python bindings

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

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

8 years ago[libclang] Expose AutoType
Sergey Kalinichev [Sun, 15 Nov 2015 13:10:10 +0000 (13:10 +0000)]
[libclang] Expose AutoType

Expose the AutoType via LibClang and python bindings

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

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

8 years agoRemove some trailing whitespace
Sergey Kalinichev [Sun, 15 Nov 2015 12:37:01 +0000 (12:37 +0000)]
Remove some trailing whitespace

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

8 years agoMake the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.
Yaron Keren [Sun, 15 Nov 2015 08:06:27 +0000 (08:06 +0000)]
Make the mingw toolchain accept 'ld' and 'lld' only as values to -fuse-ld.
Post-commit suggestion by Filipe Cabecinhas.

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

8 years agoFix a layering oddity by passing Sema to DeclSpec::Finish instead of DiagnosticsEngin...
Craig Topper [Sun, 15 Nov 2015 03:32:11 +0000 (03:32 +0000)]
Fix a layering oddity by passing Sema to DeclSpec::Finish instead of DiagnosticsEngine and Preprocessor. Everything the preprocessor was being used for can be acquired from Sema.

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

8 years ago[analyzer] Refer to capture field to determine if capture is reference.
Devin Coughlin [Sun, 15 Nov 2015 03:07:17 +0000 (03:07 +0000)]
[analyzer] Refer to capture field to determine if capture is reference.

The analyzer incorrectly treats captures as references if either the original
captured variable is a reference or the variable is captured by reference.
This causes the analyzer to crash when capturing a reference type by copy
(PR24914). Fix this by refering solely to the capture field to determine when a
DeclRefExpr for a lambda capture should be treated as a reference type.

https://llvm.org/bugs/show_bug.cgi?id=24914
rdar://problem/23524412

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

8 years ago[Sema] Don't crash trying to diagnose abs called on a pointer type
David Majnemer [Sun, 15 Nov 2015 03:04:34 +0000 (03:04 +0000)]
[Sema] Don't crash trying to diagnose abs called on a pointer type

Clang tries to figure out if a call to abs is suspicious by looking
through implicit casts to look at the underlying, implicitly converted
type.
Interestingly, C has implicit conversions from pointer-ish types like
function to less exciting types like int.  This trips up our 'abs'
checker because it doesn't know which variant of 'abs' is appropriate.

Instead, diagnose 'abs' called on function types upfront.  This sort of
thing is highly suspicious and is likely indicative of a missing
pointer dereference/function call/array index operation.

This fixes PR25532.

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

8 years agoUse Sema::getLocForEndOfToken instead of Preprocessor::getLocForEndOfToken. NFC
Craig Topper [Sun, 15 Nov 2015 02:31:46 +0000 (02:31 +0000)]
Use Sema::getLocForEndOfToken instead of Preprocessor::getLocForEndOfToken. NFC

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

8 years ago[WebAssembly] Remove the "const" attribute from __builtin_wasm_memory_size.
Dan Gohman [Sat, 14 Nov 2015 22:57:34 +0000 (22:57 +0000)]
[WebAssembly] Remove the "const" attribute from __builtin_wasm_memory_size.

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

8 years agoMove diagnostics from Parse to Sema to remove Sema's dependency on ParserDiagnostic...
Craig Topper [Sat, 14 Nov 2015 19:31:56 +0000 (19:31 +0000)]
Move diagnostics from Parse to Sema to remove Sema's dependency on ParserDiagnostic.h diagnostics.

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

8 years agoFix indentation. NFC
Craig Topper [Sat, 14 Nov 2015 19:31:52 +0000 (19:31 +0000)]
Fix indentation. NFC

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

8 years agoMerge some similar diagnostics using %select.
Craig Topper [Sat, 14 Nov 2015 18:16:08 +0000 (18:16 +0000)]
Merge some similar diagnostics using %select.

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

8 years agoMinor formatting fixes. NFC
Craig Topper [Sat, 14 Nov 2015 18:16:02 +0000 (18:16 +0000)]
Minor formatting fixes. NFC

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

8 years agoFix 80 column violation. NFC.
Craig Topper [Sat, 14 Nov 2015 18:16:00 +0000 (18:16 +0000)]
Fix 80 column violation. NFC.

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

8 years agoFix spelling error in comment.
Craig Topper [Sat, 14 Nov 2015 18:15:55 +0000 (18:15 +0000)]
Fix spelling error in comment.

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

8 years ago[X86][MMX] Sorted MMX IR + assembly codegen builtin tests
Simon Pilgrim [Sat, 14 Nov 2015 13:25:06 +0000 (13:25 +0000)]
[X86][MMX] Sorted MMX IR + assembly codegen builtin tests

Makes it easier to track what tests are missing....

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

8 years ago[X86][MMX] Added MMX IR + assembly codegen builtin tests
Simon Pilgrim [Sat, 14 Nov 2015 12:47:44 +0000 (12:47 +0000)]
[X86][MMX] Added MMX IR + assembly codegen builtin tests

Improved tests as discussed in PR24580

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

8 years agoMark is_destructible/is_nothrow_destructible as implemented
David Majnemer [Sat, 14 Nov 2015 07:21:35 +0000 (07:21 +0000)]
Mark is_destructible/is_nothrow_destructible as implemented

These were implemented back in r244564.  However, I forgot to update the
docs.

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

8 years ago[modules] Allow "redefinition" of typedef of anon tag from unimported submodule
Ben Langmuir [Sat, 14 Nov 2015 03:26:14 +0000 (03:26 +0000)]
[modules] Allow "redefinition" of typedef of anon tag from unimported submodule

r233345 started being stricter about typedef names for linkage purposes
in non-visible modules, but broke languages without the ODR.

rdar://23527954

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

8 years agoAdd support for the always_inline + target feature diagnostic to print
Eric Christopher [Sat, 14 Nov 2015 02:38:37 +0000 (02:38 +0000)]
Add support for the always_inline + target feature diagnostic to print
out the first missing target feature that's required and reword
the diagnostic accordingly.

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

8 years agoUse %select to merge similar diagnostics. NFC
Craig Topper [Sat, 14 Nov 2015 02:09:55 +0000 (02:09 +0000)]
Use %select to merge similar diagnostics. NFC

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

8 years agoClarify and elaborate the conditions on which we're checking target
Eric Christopher [Sat, 14 Nov 2015 01:56:04 +0000 (01:56 +0000)]
Clarify and elaborate the conditions on which we're checking target
features for calls.

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

8 years agoMake some tests LLVM-optimization agnostic and remove some others that were beyond...
David Blaikie [Sat, 14 Nov 2015 01:10:38 +0000 (01:10 +0000)]
Make some tests LLVM-optimization agnostic and remove some others that were beyond value/repair

Several of these tests (the two deleted, and the one removal edit) were
relying on the optimizer to collapse things to test some frontend
feature. The tests were really old and features seemed amply covered by
other parts of the test suite, so I just removed them.

If anyone thinks they're valuable enough to keep/fix, we can play around
with that, for sure.

(inspired by r252872)

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