]> granicus.if.org Git - clang/log
clang
10 years agoWith this patch -Wwrite-strings is still implemented with the terrible
Rafael Espindola [Tue, 5 Nov 2013 21:43:54 +0000 (21:43 +0000)]
With this patch -Wwrite-strings is still implemented with the terrible
hack of passing -fconst-strings to -cc1, but at least the driver uses
the regular warning checking code path.

Since we don't support a warning that is DefaultIgnore in one language
but not in another, this patch creates a dummy C only warning in the same
group as the existing one to get the desired effect.

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

10 years agoProduce direct calls instead of alias to linkonce_odr functions.
Rafael Espindola [Tue, 5 Nov 2013 21:37:29 +0000 (21:37 +0000)]
Produce direct calls instead of alias to linkonce_odr functions.

This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.

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

10 years agoDocumentation tweaks: Fix a typo in a reference to the C++ standard,
James Dennett [Tue, 5 Nov 2013 19:37:38 +0000 (19:37 +0000)]
Documentation tweaks: Fix a typo in a reference to the C++ standard,
another typo in a comment, and update formatting of some comments to
use Doxygen \brief annotations instead of repeating the name of the
documented entity.

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

10 years agoclang-format: Allow line merging and partial formatting of nested blocks
Daniel Jasper [Tue, 5 Nov 2013 19:10:03 +0000 (19:10 +0000)]
clang-format: Allow line merging and partial formatting of nested blocks

Before, clang-format would always format entire nested blocks, which
can be unwanted e.g. for long DEBUG({...}) statements. Also
clang-format would not allow to merge lines in nested blocks (e.g. to
put "if (a) return;" on one line in Google style).

This is the first step of several refactorings mostly focussing on the
additional functionality (by reusing the "format many lines" code to
format the children of a nested block). The next steps are:
* Pull out the line merging into its own class.
* Seperate the formatting of many lines from the formatting of a single
  line (and the analysis of the solution space).

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

10 years agoRevert "Try to correct a mistyped "-" or ">" to "->" for some C++ cases."
Kaelyn Uhrain [Tue, 5 Nov 2013 18:28:21 +0000 (18:28 +0000)]
Revert "Try to correct a mistyped "-" or ">" to "->" for some C++ cases."

Revert this patch until cases of rejected valid code (e.g. identifiers
that require ADL to be resolved properly) are fixed.

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

10 years agoImplement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.
Jiangning Liu [Tue, 5 Nov 2013 17:42:24 +0000 (17:42 +0000)]
Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.

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

10 years agoFix vbtable indices when a class shares the vbptr with a non-virtual base
Timur Iskhodzhanov [Tue, 5 Nov 2013 15:54:58 +0000 (15:54 +0000)]
Fix vbtable indices when a class shares the vbptr with a non-virtual base

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

10 years agoDisable test fully with REQUIRES
Alp Toker [Tue, 5 Nov 2013 13:27:19 +0000 (13:27 +0000)]
Disable test fully with REQUIRES

Third time's the charm, sorry for the noise.

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

10 years agoDisable the test that crashes
Alp Toker [Tue, 5 Nov 2013 12:55:00 +0000 (12:55 +0000)]
Disable the test that crashes

XFAIL wasn't enough for some of the build servers.

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

10 years agoFix a test that was never being run, mark it XFAIL
Alp Toker [Tue, 5 Nov 2013 12:45:46 +0000 (12:45 +0000)]
Fix a test that was never being run, mark it XFAIL

Turns out this has always been crashing since the test landed in
r186647:

  Assertion failed: (Access != AS_none && "Access specifier is AS_none inside a record decl"), function CheckAccessDeclContext, file clang/lib/AST/DeclBase.cpp, line 690.

Needs attention.

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

10 years agoMake test run reliably
Alp Toker [Tue, 5 Nov 2013 12:45:43 +0000 (12:45 +0000)]
Make test run reliably

llc waits for input on stdin, which was not provided in this test. It
was running only thanks to a quirk in the way lit concatenates
commands.

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

10 years agoFix test that was not being run
Alp Toker [Tue, 5 Nov 2013 12:45:40 +0000 (12:45 +0000)]
Fix test that was not being run

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

10 years agoFix test that wasn't testing anything
Alp Toker [Tue, 5 Nov 2013 12:45:37 +0000 (12:45 +0000)]
Fix test that wasn't testing anything

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

10 years agoDo not allow functions or kernels called 'main' in OpenCL.
Joey Gouly [Tue, 5 Nov 2013 12:30:39 +0000 (12:30 +0000)]
Do not allow functions or kernels called 'main' in OpenCL.

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

10 years agoSimplify test case added in r194059
David Majnemer [Tue, 5 Nov 2013 10:05:58 +0000 (10:05 +0000)]
Simplify test case added in r194059

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

10 years agoLex: Require that '#' be followed by a macro parameter name when preceded by '##'
David Majnemer [Tue, 5 Nov 2013 09:30:17 +0000 (09:30 +0000)]
Lex: Require that '#' be followed by a macro parameter name when preceded by '##'

After lexing a '##', we would look ahead and check to see if it was
followed by '__VA_ARGS__'.  After doing so, we would then go ahead and
lex the token.

However we would fail in the case where the '##' was followed by a '#'
followed by an identifier because we would have lexed the '#' separately
from the identifier, bypassing our parameter validation logic.

Instead, lex the tokens coming after the '##' later.

This fixes PR17804.

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

10 years agoRemove stray comma from documentation.
Richard Smith [Tue, 5 Nov 2013 09:12:55 +0000 (09:12 +0000)]
Remove stray comma from documentation.

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

10 years agoC++1y sized deallocation: if we have a use, but not a definition, of a sized
Richard Smith [Tue, 5 Nov 2013 09:12:18 +0000 (09:12 +0000)]
C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable definition of the function that
forwards to the corresponding unsized deallocation.

This allows a C++ standard library implementation to provide both a sized and
an unsized deallocation function, where the unsized one does not just call the
sized one, for instance by putting both in the same object file within an
archive.

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

10 years agoEnable links now that they work.
Richard Smith [Tue, 5 Nov 2013 08:27:00 +0000 (08:27 +0000)]
Enable links now that they work.

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

10 years agoSema: Improve comment introduced in r193397
David Majnemer [Tue, 5 Nov 2013 08:01:18 +0000 (08:01 +0000)]
Sema: Improve comment introduced in r193397

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

10 years agoExpand the test a bit.
Rafael Espindola [Tue, 5 Nov 2013 07:11:42 +0000 (07:11 +0000)]
Expand the test a bit.

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

10 years agoAdd a testcase from the recent bootstrap failure.
Rafael Espindola [Tue, 5 Nov 2013 06:44:57 +0000 (06:44 +0000)]
Add a testcase from the recent bootstrap failure.

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

10 years agoRevert "Produce direct calls instead of alias to linkonce_odr functions."
Rafael Espindola [Tue, 5 Nov 2013 05:29:54 +0000 (05:29 +0000)]
Revert "Produce direct calls instead of alias to linkonce_odr functions."

This reverts commit r194046.
Debugging a bootstrap issue.

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

10 years agoProduce direct calls instead of alias to linkonce_odr functions.
Rafael Espindola [Tue, 5 Nov 2013 05:22:36 +0000 (05:22 +0000)]
Produce direct calls instead of alias to linkonce_odr functions.

This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.

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

10 years agoImplemented aarch64 neon intrinsic vcopy_lane with float type.
Kevin Qin [Tue, 5 Nov 2013 02:05:44 +0000 (02:05 +0000)]
Implemented aarch64 neon intrinsic vcopy_lane with float type.

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

10 years agoObjectiveC. Method implementations should only check for
Fariborz Jahanian [Tue, 5 Nov 2013 00:28:21 +0000 (00:28 +0000)]
ObjectiveC. Method implementations should only check for
"Missing call to Super" in the overriding method and
not in the method itself. // rdar://15385981.

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

10 years agoInclude non-explicit submodules in exported module list
Dmitri Gribenko [Mon, 4 Nov 2013 21:51:33 +0000 (21:51 +0000)]
Include non-explicit submodules in exported module list

This change fixes Richard's testcase for r193815.  Now we include non-explicit
submodules into the list of exports.

The test failed previously because:
- recursive_visibility_a1.inner is not imported (only recursive_visibility_a1 is),
- thus the 'inner' submodule is not showing up in any of the import lists,
- and because of this getExportedModules() is not returning the
  correct module set -- it only considers modules that are imported.

The fix is to make Module::getExportedModules() include non-explicit submodules
into the list of exports.

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

10 years ago[analyzer] Track the count of NSOrderedSet similarly to other fast enumerations.
Anna Zaks [Mon, 4 Nov 2013 19:13:08 +0000 (19:13 +0000)]
[analyzer] Track the count of NSOrderedSet similarly to other fast enumerations.

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

10 years ago[analyzer] Suppress warnings coming out of std::basic_string.
Anna Zaks [Mon, 4 Nov 2013 19:13:03 +0000 (19:13 +0000)]
[analyzer] Suppress warnings coming out of std::basic_string.

The analyzer cannot reason about the internal invariances of the data structure (radar://15194597).

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

10 years agoTry to correct a mistyped "-" or ">" to "->" for some C++ cases.
Kaelyn Uhrain [Mon, 4 Nov 2013 18:59:34 +0000 (18:59 +0000)]
Try to correct a mistyped "-" or ">" to "->" for some C++ cases.

Similar C code isn't caught as it seems to hit a different code path.
Also, as the check is only done for record pointers, cases involving
an overloaded operator-> are not handled either. Note that the reason
this check is done in the parser instead of Sema is not related to
having enough knowledge about the current state as it is about being
able to fix up the parser's state to be able to recover and traverse the
correct code paths.

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

10 years agoUse aliases for more constructors and destructors.
Rafael Espindola [Mon, 4 Nov 2013 18:38:59 +0000 (18:38 +0000)]
Use aliases for more constructors and destructors.

With this patch we produce alias for cases like

template<typename T>
struct foobar {
  foobar() {
  }
};
template struct foobar<void>;

We just have to be careful to produce the same aliases in every TU because
of comdats.

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

10 years agoclang-format this if.
Rafael Espindola [Mon, 4 Nov 2013 17:13:51 +0000 (17:13 +0000)]
clang-format this if.

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

10 years agoCodeGen: Test that simple expressions are simplified at -O0
Justin Bogner [Mon, 4 Nov 2013 16:13:23 +0000 (16:13 +0000)]
CodeGen: Test that simple expressions are simplified at -O0

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

10 years agoCodeGen: Use EmitBranchOnBool when generating For and CXXForRange
Justin Bogner [Mon, 4 Nov 2013 16:13:21 +0000 (16:13 +0000)]
CodeGen: Use EmitBranchOnBool when generating For and CXXForRange

A while ago EmitForStmt was changed to explicitly evaluate the
condition expression and create a branch instead of using
EmitBranchOnBool, so that the condition expression could be used for
some cleanup logic. The cleanup stuff has since been reorganized, and
this is no longer necessary.

In EmitCXXForRange, the evaluated condition was never used for
anything else. The logic was presumably modeled on EmitForStmt.

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

10 years agoCodeGen: Move an initialization away from an unrelated comment
Justin Bogner [Mon, 4 Nov 2013 16:13:18 +0000 (16:13 +0000)]
CodeGen: Move an initialization away from an unrelated comment

An initialization somehow found its way in between a comment and the
block of code the comment is about. Moving the initialization makes
this less confusing.

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

10 years agoclang/lib/Parse/CMakeLists.txt: Fixup corresponding to r193989. ClangAttrTypeArg...
NAKAMURA Takumi [Mon, 4 Nov 2013 13:10:53 +0000 (13:10 +0000)]
clang/lib/Parse/CMakeLists.txt: Fixup corresponding to r193989. ClangAttrTypeArg is required here.

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

10 years agoUpdating the makefile to reflect CMake; addendum to r193989.
Aaron Ballman [Mon, 4 Nov 2013 13:02:44 +0000 (13:02 +0000)]
Updating the makefile to reflect CMake; addendum to r193989.

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

10 years agoAttributes which accept a type as their sole argument are no longer hard coded into...
Aaron Ballman [Mon, 4 Nov 2013 12:55:56 +0000 (12:55 +0000)]
Attributes which accept a type as their sole argument are no longer hard coded into the parser. Instead, they are automatically listed through tablegen.

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

10 years agoMake ADLResult::iterator a proper iterator.
Benjamin Kramer [Mon, 4 Nov 2013 10:29:56 +0000 (10:29 +0000)]
Make ADLResult::iterator a proper iterator.

PR17796.

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

10 years agoDriver: Add support for -march=bdver3 on x86.
Benjamin Kramer [Mon, 4 Nov 2013 10:29:51 +0000 (10:29 +0000)]
Driver: Add support for -march=bdver3 on x86.

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

10 years agoIssue a diagnostic if an implicitly-defined move assignment operator would move
Richard Smith [Mon, 4 Nov 2013 04:26:14 +0000 (04:26 +0000)]
Issue a diagnostic if an implicitly-defined move assignment operator would move
the same virtual base class multiple times (and the move assignment is used,
and the move assignment for the virtual base is not trivial).

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

10 years agoIt is no longer necessary to opt out of pretty stack traces.
Filip Pizlo [Mon, 4 Nov 2013 02:25:34 +0000 (02:25 +0000)]
It is no longer necessary to opt out of pretty stack traces.

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

10 years agoUpdate a comment to match current core issues list.
Richard Smith [Mon, 4 Nov 2013 02:02:27 +0000 (02:02 +0000)]
Update a comment to match current core issues list.

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

10 years agoImplement final resolution of DR1402: implicitly-declared move operators that
Richard Smith [Mon, 4 Nov 2013 01:48:18 +0000 (01:48 +0000)]
Implement final resolution of DR1402: implicitly-declared move operators that
would be deleted are still declared, but are ignored by overload resolution.

Also, don't delete such members if a subobject has no corresponding move
operation and a non-trivial copy. This causes us to implicitly declare move
operations in more cases, but risks move-assigning virtual bases multiple
times in some circumstances (a warning for that is to follow).

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

10 years agoSema: Do not allow overloading between methods based on restrict
David Majnemer [Sun, 3 Nov 2013 23:51:28 +0000 (23:51 +0000)]
Sema: Do not allow overloading between methods based on restrict

If the sole distinction between two declarations is that one has a
__restrict qualifier then we should not consider it to be an overload.

Instead, we will consider it as an incompatible redeclaration which is
similar to how MSVC, ICC and GCC would handle it.

This fixes PR17786.

N.B. We must not mangle in __restrict into method qualifiers becase we
don't allow overloading between such declarations anymore.  To do
otherwise would be a violation of the Itanium ABI.

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

10 years agoFix test to actually check the FixIt-applied code
Alp Toker [Sun, 3 Nov 2013 01:50:38 +0000 (01:50 +0000)]
Fix test to actually check the FixIt-applied code

r102230 added an 'echo' making this a no-op.

Also fixes FAIL on native Windows with no shell/GnuWin32.

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

10 years agoFix typo in err_flexible_array_empty_aggregate
David Majnemer [Sun, 3 Nov 2013 00:16:44 +0000 (00:16 +0000)]
Fix typo in err_flexible_array_empty_aggregate

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

10 years agoOS X 10.9+ and iOS 7+ support load/store of big atomic objects.
Bob Wilson [Sat, 2 Nov 2013 23:27:49 +0000 (23:27 +0000)]
OS X 10.9+ and iOS 7+ support load/store of big atomic objects.

rdar://13973577

Patch by Fariborz Jahanian.

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

10 years agoDefault to use libc++ on OS X 10.9+ and iOS 7+.
Bob Wilson [Sat, 2 Nov 2013 23:19:53 +0000 (23:19 +0000)]
Default to use libc++ on OS X 10.9+ and iOS 7+.

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

10 years agoAdd test case for r193923
David Majnemer [Sat, 2 Nov 2013 12:11:58 +0000 (12:11 +0000)]
Add test case for r193923

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

10 years agoSema: Disallow inheriting from classes with flexible array members
David Majnemer [Sat, 2 Nov 2013 12:00:36 +0000 (12:00 +0000)]
Sema: Disallow inheriting from classes with flexible array members

Flexible array members inherently index off of the end of their parent
type.

We shouldn't allow this type to be used as a base, virtual or otherwise,
because indexing off the end may find us inside of another base or the
derived types members.

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

10 years agoSema: Remove stray whitespace around Sema::CheckBaseSpecifier
David Majnemer [Sat, 2 Nov 2013 11:24:41 +0000 (11:24 +0000)]
Sema: Remove stray whitespace around Sema::CheckBaseSpecifier

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

10 years agoRemove a stray tab character from warn_objc_root_class_missing
David Majnemer [Sat, 2 Nov 2013 11:21:23 +0000 (11:21 +0000)]
Remove a stray tab character from warn_objc_root_class_missing

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

10 years agoSema: Disallow derived classes with virtual bases from having flexible array members
David Majnemer [Sat, 2 Nov 2013 11:19:13 +0000 (11:19 +0000)]
Sema: Disallow derived classes with virtual bases from having flexible array members

Flexible array members only work out if they are the last field of a
record, however virtual bases would give us many situations where the
flexible array member would overlap with the virtual base fields.

It is unlikely in the extreme that this behavior was intended by the
user so raise a diagnostic instead of accepting.  This is will not
reject conforming code because flexible array members are an extension
in C++ mode.

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

10 years agoSema: Cleanup and simplify anonymous union diagnostics
David Majnemer [Sat, 2 Nov 2013 10:38:05 +0000 (10:38 +0000)]
Sema: Cleanup and simplify anonymous union diagnostics

The determination of which diagnostics would be issued for certain
anonymous unions started to get a little ridiculous.  Clean this up by
inverting the condition-tree's logic from dialect -> issue to
issue -> diagnostic.

As part of this cleanup, move ext_c99_flexible_array_member from
DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by
Sema, not Parse.

Also, the liberty was taken to edit ext_c99_flexible_array_member to
match other, similar, diagnostics.

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

10 years agoSema: Flexible array members were introduced in C99, diagnose their use in C++
David Majnemer [Sat, 2 Nov 2013 09:22:44 +0000 (09:22 +0000)]
Sema: Flexible array members were introduced in C99, diagnose their use in C++

The declaration of a flexible array member was correctly diagnosed as an
extension in C89 mode but not in C++.

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

10 years agoSema: Properly indent statements in Sema::ActOnLastBitfield
David Majnemer [Sat, 2 Nov 2013 08:41:50 +0000 (08:41 +0000)]
Sema: Properly indent statements in Sema::ActOnLastBitfield

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

10 years agoSema: trim trailing whitespace in Sema::ActOnLastBitfield
David Majnemer [Sat, 2 Nov 2013 08:41:01 +0000 (08:41 +0000)]
Sema: trim trailing whitespace in Sema::ActOnLastBitfield

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

10 years agoclang/test/CodeGenCXX/builtins.cpp: Fix for -Asserts.
NAKAMURA Takumi [Sat, 2 Nov 2013 02:58:42 +0000 (02:58 +0000)]
clang/test/CodeGenCXX/builtins.cpp: Fix for -Asserts.

  - Don't seek "entry:" It dosen't appear with -Asserts.
  - Take care that Codegen'ed Instruction(s) wouldn't have name(s) in -Asserts.

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

10 years agoChange the other -Wtautological-compare warnings to not trigger in template
Richard Trieu [Sat, 2 Nov 2013 02:11:23 +0000 (02:11 +0000)]
Change the other -Wtautological-compare warnings to not trigger in template
specializations.  Also switch to -Wuninitialized for a test case that depended
on a warning firing in template specializations.

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

10 years agoAdding triple to lit test fixed in r193901
Warren Hunt [Sat, 2 Nov 2013 00:34:45 +0000 (00:34 +0000)]
Adding triple to lit test fixed in r193901

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

10 years agoFixes lit test that doesn't fail on windows
Warren Hunt [Sat, 2 Nov 2013 00:12:15 +0000 (00:12 +0000)]
Fixes lit test that doesn't fail on windows

long in linux 64 is 64 bits but is always 32 bits on windows.  The lit test was modified
to use long long instead of long and check for 64-bit mangling.

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

10 years agoImproves compatibility with cl.exe when laying out array fields
Warren Hunt [Fri, 1 Nov 2013 23:59:41 +0000 (23:59 +0000)]
Improves compatibility with cl.exe when laying out array fields

Differential Revision: http://llvm-reviews.chandlerc.com/D2090

Clang was "improperly" over-aligning arrays with sizes are not a multiple of
their alignment.
This behavior was removed in microsoft 32 bit mode.

In addition, after examination of ASTContext::getTypeInfoImpl, a redundant code block in
MicrosoftRecordLayoutBuilder::getAdjustedFieldInfo was deleted.

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

10 years agoWraps lazily generated builtins in an extern "C" context
Warren Hunt [Fri, 1 Nov 2013 23:46:51 +0000 (23:46 +0000)]
Wraps lazily generated builtins in an extern "C" context

Differential Revision: http://llvm-reviews.chandlerc.com/D2082

Adds a lang_c LinkageSpecDecl to lazily generated builtins. This enforces correct
behavior for builtins in a variety of cases without special treatment elsewhere within
the compiler (special treatment is removed by the patch). It also allows for C++
overloads of builtin functions, which Microsoft uses in their headers e.g.
_InterlockedExchangeAdd is an extern C builtin for the long type but an inline wrapper
for int type.

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

10 years agoPreload module maps in normal user directories, too.
Douglas Gregor [Fri, 1 Nov 2013 23:08:38 +0000 (23:08 +0000)]
Preload module maps in normal user directories, too.

... in case someone decides to -I/usr/include <rdar://problem/15235948>.

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

10 years agoAdd non-type template parameter test for disabled -Wtautological-compare
Richard Trieu [Fri, 1 Nov 2013 22:12:15 +0000 (22:12 +0000)]
Add non-type template parameter test for disabled -Wtautological-compare
warning in template specializations.

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

10 years agoObjectiveC. Define a new cc1 flag
Fariborz Jahanian [Fri, 1 Nov 2013 21:58:17 +0000 (21:58 +0000)]
ObjectiveC. Define a new cc1 flag
-fobjc-subscripting-legacy-runtime which is off
by default and on only when using ObjectiveC
legacy runtime. Use this flag to allow
array and dictionary subscripting and disallow
objectiveC pointer arithmatic in ObjectiveC
legacy runtime. // rdar://15363492

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

10 years agoDisable -Wtautological-compare in template instantiations.
Richard Trieu [Fri, 1 Nov 2013 21:47:19 +0000 (21:47 +0000)]
Disable -Wtautological-compare in template instantiations.

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

10 years agoDisable -Wtautological-constant-out-of-range-compare in template instantiations.
Richard Trieu [Fri, 1 Nov 2013 21:19:43 +0000 (21:19 +0000)]
Disable -Wtautological-constant-out-of-range-compare in template instantiations.

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

10 years agoSanitizerArgs: add ability to filter/diagnose unsupported sanitizers.
Peter Collingbourne [Fri, 1 Nov 2013 18:16:25 +0000 (18:16 +0000)]
SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.

The thread, memory, dataflow and function sanitizers are now diagnosed if
enabled explicitly on an unsupported platform.  Unsupported sanitizers which
are enabled implicitly (as part of a larger group) are silently disabled.  As a
side effect, this makes SanitizerArgs parsing toolchain-dependent (and thus
essentially reverts r188058), and moves SanitizerArgs ownership to ToolChain.

Differential Revision: http://llvm-reviews.chandlerc.com/D1990

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

10 years agoAArch64: Fix wildcard matching on CHECK lines. Now recognises arch64--.
Amara Emerson [Fri, 1 Nov 2013 12:53:57 +0000 (12:53 +0000)]
AArch64: Fix wildcard matching on CHECK lines. Now recognises arch64--.

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

10 years agoSema: Make helper function static.
Benjamin Kramer [Fri, 1 Nov 2013 11:50:55 +0000 (11:50 +0000)]
Sema: Make helper function static.

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

10 years agoSimplify computation of visible module set.
Richard Smith [Fri, 1 Nov 2013 02:19:14 +0000 (02:19 +0000)]
Simplify computation of visible module set.

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

10 years agoSupport return type deduction for templates in -fdelayed-template-parsing (microsoft...
Faisal Vali [Fri, 1 Nov 2013 02:01:01 +0000 (02:01 +0000)]
Support return type deduction for templates in -fdelayed-template-parsing (microsoft) mode

Please see http://llvm-reviews.chandlerc.com/D2053 for discussion and Richard's stamp.

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

10 years agoObjectiveC migrator. When inferring readwrite property,
Fariborz Jahanian [Fri, 1 Nov 2013 00:26:48 +0000 (00:26 +0000)]
ObjectiveC migrator. When inferring readwrite property,
do not remove the setter if its availability differs
from availability of the getter (which is now turned into
a property). Otherwise, synthesized setter will
inherit availability of the property (which is incorrect).
// rdar://15300059

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

10 years ago[AArch64] Add support for NEON scalar fixed-point convert to floating-point instructions.
Chad Rosier [Thu, 31 Oct 2013 22:37:08 +0000 (22:37 +0000)]
[AArch64] Add support for NEON scalar fixed-point convert to floating-point instructions.

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

10 years agoClang modules: collect exports recursively
Dmitri Gribenko [Thu, 31 Oct 2013 22:24:10 +0000 (22:24 +0000)]
Clang modules: collect exports recursively

This change makes Module::buildVisibleModulesCache() collect exported modules
recursively.

While computing a set of exports, getExportedModules() iterates over the set of
imported modules and filters it.  But it does not consider the set of exports
of those modules -- it is the responsibility of the caller to do this.

Here is a certain instance of this issue.  Module::isModuleVisible says that
CoreFoundation.CFArray submodule is not visible from Cocoa.  Why?

- Cocoa imports Foundation.
- Foundation has an export restriction: "export *".
- Foundation imports CoreFoundation.  (Just the top-level module.)
- CoreFoundation exports CoreFoundation.CFArray.

To decide which modules are visible from Cocoa, we collect all exported modules
from immediate imports in Cocoa:

> visibleModulesFro(Cocoa) = exported(Foundation) + exported(CoreData) + exported(AppKit)

To find out which modules are exported, we filter imports according to
restrictions:

> exported(Foundation) = filterByModuleMapRestrictions(imports(Foundation))

Because Foundation imports CoreFoundation (not CoreFoundation.CFArray), the
CFArray submodule is considered not exported from Foundation, and is not
visible from Cocoa (according to Module::isModuleVisible).

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

10 years agoStore a TypeArgument on an attribute as a TypeSourceInfo*, rather than as a
Richard Smith [Thu, 31 Oct 2013 21:23:20 +0000 (21:23 +0000)]
Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as a
QualType with a SourceLocation stashed alongside.

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

10 years agoFix a C struct diagnostic regression introduced by r187504 (PR17762).
Kaelyn Uhrain [Thu, 31 Oct 2013 20:32:56 +0000 (20:32 +0000)]
Fix a C struct diagnostic regression introduced by r187504 (PR17762).

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

10 years ago[AArch64] Add support for NEON scalar shift immediate instructions.
Chad Rosier [Thu, 31 Oct 2013 19:29:05 +0000 (19:29 +0000)]
[AArch64] Add support for NEON scalar shift immediate instructions.

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

10 years agoUse StringRef::endswith_lower. No functionality change.
Rui Ueyama [Thu, 31 Oct 2013 19:12:53 +0000 (19:12 +0000)]
Use StringRef::endswith_lower. No functionality change.

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

10 years ago[analyzer] Don't crash when a path goes through a 'delete' destructor call.
Jordan Rose [Thu, 31 Oct 2013 18:41:15 +0000 (18:41 +0000)]
[analyzer] Don't crash when a path goes through a 'delete' destructor call.

This was just left unimplemnted from r191381; the fix is to report this call
location as the location of the 'delete' expr.

PR17746

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

10 years agoiboutletcollection really does have custom parsing.
Aaron Ballman [Thu, 31 Oct 2013 17:44:01 +0000 (17:44 +0000)]
iboutletcollection really does have custom parsing.

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

10 years agoRemove unused diagnostic.
Benjamin Kramer [Thu, 31 Oct 2013 17:36:01 +0000 (17:36 +0000)]
Remove unused diagnostic.

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

10 years agoObjectiveC migrator. Change naming hueristic for
Fariborz Jahanian [Thu, 31 Oct 2013 16:10:44 +0000 (16:10 +0000)]
ObjectiveC migrator. Change naming hueristic for
deprecated categories, fixes a typo reported by
Jordan.

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

10 years agosizeof... a parameter pack should be an unevaluated context.
Faisal Vali [Thu, 31 Oct 2013 15:58:51 +0000 (15:58 +0000)]
sizeof... a parameter pack should be an unevaluated context.

- can't think of a way to test this without generic lambda captures, but will include a test once that patch is made commit-ready.

patch was ok'd by Doug.
http://llvm-reviews.chandlerc.com/D2029

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

10 years agoFixed bug with checking the kind of types.
Chris Wailes [Thu, 31 Oct 2013 15:38:12 +0000 (15:38 +0000)]
Fixed bug with checking the kind of types.

The isLValueReferenceType function checks to see if the QualType's
canonical type is an LValue reference, and not if the QualType
itself is an LValue reference.  This caused a segfault when trying
to cast the QualType's Type to a LValueReference.  This is now
fixed by casting the result of getCanonicalType().

In addition, a test was added to isConsumableType to prevent
segfaults when a type being tested by the analysis is a reference
to a pointer or a pointer to a reference.

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

10 years ago[AArch64] Add some CPU targets for "generic", A-53 and A-57.
Amara Emerson [Thu, 31 Oct 2013 09:32:33 +0000 (09:32 +0000)]
[AArch64] Add some CPU targets for "generic", A-53 and A-57.

Enables the clang driver to begin targeting specific CPUs. Introduced a
"generic" CPU which will ensure that the optional FP feature is enabled
by default when it gets to LLVM, without needing any extra arguments.
Cortex-A53 and A-57 are also introduced with tests, although backend
handling of them does not yet exist.

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

10 years agoFactor out custom parsing for iboutletcollection and vec_type_hint attributes
Richard Smith [Thu, 31 Oct 2013 01:56:18 +0000 (01:56 +0000)]
Factor out custom parsing for iboutletcollection and vec_type_hint attributes
into a separate "parse an attribute that takes a type argument" codepath. This
results in both codepaths being a lot cleaner and simpler, and fixes some bugs
where the type argument handling bled into the expression argument handling and
caused us to both accept invalid and reject valid attribute arguments.

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

10 years agoObjectiveC migrator: annotate all protocols/methods in
Fariborz Jahanian [Thu, 31 Oct 2013 00:06:58 +0000 (00:06 +0000)]
ObjectiveC migrator: annotate all protocols/methods in
a category with NSxxxDeprecated name with deprecated
annotation. // rdar://15337661

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

10 years ago[libclang/python] Add __contains__ to SourceRange class.
Argyrios Kyrtzidis [Thu, 31 Oct 2013 00:03:33 +0000 (00:03 +0000)]
[libclang/python] Add __contains__ to SourceRange class.

Patch by Loïc Jaquemet!

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

10 years agoFix Windows build by including CGFunctionInfo.h.
Mark Lacey [Wed, 30 Oct 2013 23:40:28 +0000 (23:40 +0000)]
Fix Windows build by including CGFunctionInfo.h.

CodeGenTypes.h instantiates llvm::FoldingSet<> with CGFunctionInfo,
and VC++ doesn't like the static_cast from FoldingSetImpl::Node* to
CGFunctionInfo* since it hasn't seen the definition of CGFunctionInfo
and that it inherits from FoldingSetImpl::Node.

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

10 years agoAdd CodeGenABITypes.h for use in LLDB.
Mark Lacey [Wed, 30 Oct 2013 21:53:58 +0000 (21:53 +0000)]
Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.

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

10 years agoclang-cl: Parse the /arch, /Yu and /Fp options (PR17736)
Hans Wennborg [Wed, 30 Oct 2013 17:36:27 +0000 (17:36 +0000)]
clang-cl: Parse the /arch, /Yu and /Fp options (PR17736)

We don't support these options, but should at least parse them.

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

10 years ago[mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related tests
Daniel Sanders [Wed, 30 Oct 2013 15:45:42 +0000 (15:45 +0000)]
[mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related tests

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

10 years ago[mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR...
Daniel Sanders [Wed, 30 Oct 2013 15:20:38 +0000 (15:20 +0000)]
[mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR (i.e. not intrinsics)

Also corrected the definition of the intrinsics for these instructions (the
result register is also the first operand), and added intrinsics for bsel and
bseli to clang (they already existed in the backend).

These four operations are mostly equivalent to bsel, and bseli (the difference
is which operand is tied to the result). As a result some of the tests changed
as described below.

bitwise.ll:
- bsel.v test adapted so that the mask is unknown at compile-time. This stops
  it emitting bmnzi.b instead of the intended bsel.v.
- The bseli.b test now tests the right thing. Namely the case when one of the
  values is an uimm8, rather than when the condition is a uimm8 (which is
  covered by bmnzi.b)

compare.ll:
- bsel.v tests now (correctly) emits bmnz.v instead of bsel.v because this
  is the same operation (see MSA.txt).

i8.ll
- CHECK-DAG-ized test.
- bmzi.b test now (correctly) emits equivalent bmnzi.b with swapped operands
  because this is the same operation (see MSA.txt).
- bseli.b still emits bseli.b though because the immediate makes it
  distinguishable from bmnzi.b.

vec.ll:
- CHECK-DAG-ized test.
- bmz.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).
- bsel.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).

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

10 years ago[AArch64] Add support for NEON scalar floating-point compare instructions.
Chad Rosier [Wed, 30 Oct 2013 15:20:07 +0000 (15:20 +0000)]
[AArch64] Add support for NEON scalar floating-point compare instructions.

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

10 years agoAvoid diagnosing twice on non-x86 targets
Alp Toker [Wed, 30 Oct 2013 15:07:10 +0000 (15:07 +0000)]
Avoid diagnosing twice on non-x86 targets

The PowerPC and ARM native builders spotted this.

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

10 years ago[mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not...
Daniel Sanders [Wed, 30 Oct 2013 14:45:14 +0000 (14:45 +0000)]
[mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not intrinsics)

This required correcting the definition of the bins[lr]i intrinsics because
the result is also the first operand.

It also required removing the (arbitrary) check for 32-bit immediates in
MipsSEDAGToDAGISel::selectVSplat().

Currently using binsli.d with 2 bits set in the mask doesn't select binsli.d
because the constant is legalized into a ConstantPool. Similar things can
happen with binsri.d with more than 10 bits set in the mask. The resulting
code when this happens is correct but not optimal.

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

10 years agoFix triple / REQUIRES in test from r193685
Alp Toker [Wed, 30 Oct 2013 14:38:32 +0000 (14:38 +0000)]
Fix triple / REQUIRES in test from r193685

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