platform/upstream/llvm.git
11 years agoFix typo. Change %cl to CL in Intel pattern.
Craig Topper [Mon, 22 Jul 2013 10:07:26 +0000 (10:07 +0000)]
Fix typo. Change %cl to CL in Intel pattern.

llvm-svn: 186815

11 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:58:07 +0000 (09:58 +0000)]
More Intel syntax alias fixes.

llvm-svn: 186814

11 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:42:31 +0000 (09:42 +0000)]
More Intel syntax alias fixes.

llvm-svn: 186813

11 years agoChange %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.
Craig Topper [Mon, 22 Jul 2013 09:22:49 +0000 (09:22 +0000)]
Change %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.

llvm-svn: 186812

11 years agoAdd Intel variants to aliases for some FP instructions.
Craig Topper [Mon, 22 Jul 2013 09:18:43 +0000 (09:18 +0000)]
Add Intel variants to aliases for some FP instructions.

llvm-svn: 186811

11 years agoARM: remove now unneeded custom Asm converters
Tim Northover [Mon, 22 Jul 2013 09:06:12 +0000 (09:06 +0000)]
ARM: remove now unneeded custom Asm converters

After Ulrich's r180677 (thanks!) TableGen is intelligent enough to
handle tied constraints involving complex operands properly, so
virtually all of the ARM custom converters are now unnecessary.

llvm-svn: 186810

11 years agoReverse operands for Intel syntax form of 'bt' alias.
Craig Topper [Mon, 22 Jul 2013 07:47:51 +0000 (07:47 +0000)]
Reverse operands for Intel syntax form of 'bt' alias.

llvm-svn: 186809

11 years agoDelete unused helper functions.
Nadav Rotem [Mon, 22 Jul 2013 05:19:22 +0000 (05:19 +0000)]
Delete unused helper functions.

llvm-svn: 186808

11 years agoRemove superfluous cast.
Robert Wilhelm [Mon, 22 Jul 2013 05:04:01 +0000 (05:04 +0000)]
Remove superfluous cast.

llvm-svn: 186807

11 years agoRegisterPass: Unhide -polly-show and -polly-show-only
Tobias Grosser [Mon, 22 Jul 2013 04:11:00 +0000 (04:11 +0000)]
RegisterPass: Unhide -polly-show and -polly-show-only

llvm-svn: 186806

11 years agoScopDetect: move "return false" out of INVALID macro.
Tobias Grosser [Mon, 22 Jul 2013 03:50:33 +0000 (03:50 +0000)]
ScopDetect: move "return false" out of INVALID macro.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 186805

11 years agoPR16288: A template is only missing a default template argument if it provides
Richard Smith [Mon, 22 Jul 2013 03:31:14 +0000 (03:31 +0000)]
PR16288: A template is only missing a default template argument if it provides
any default template arguments, not if it inherits some.

llvm-svn: 186804

11 years agoImplement DR257 / fix PR16659:
Richard Smith [Mon, 22 Jul 2013 02:56:56 +0000 (02:56 +0000)]
Implement DR257 / fix PR16659:
  A constructor for an abstract class does not call constructors for virtual
  base classes, so it is not an error if no initializer is present for the
  virtual base and the virtual base cannot be default initialized.

Also provide a (disabled by default, for now) warning for the case where a
virtual base class's initializer is ignored in an abstract class's constructor,
and address a defect in DR257 where it was not carried through to C++11's rules
for implicit deletion of special member functions.

Based on a patch by Maurice Bos.

llvm-svn: 186803

11 years agoSemaTemplate.cpp: Prune a stray "\param NumParamLists" in comment. [-Wdocumentation]
NAKAMURA Takumi [Mon, 22 Jul 2013 01:27:42 +0000 (01:27 +0000)]
SemaTemplate.cpp: Prune a stray "\param NumParamLists" in comment. [-Wdocumentation]

llvm-svn: 186802

11 years agoAdded missing - in the header of PrologEpilogInserter.h so that editors properly...
Michael Gottesman [Mon, 22 Jul 2013 00:52:55 +0000 (00:52 +0000)]
Added missing - in the header of PrologEpilogInserter.h so that editors properly realize it is a c++ header and not a c header.

llvm-svn: 186801

11 years agoTest updates missed from r186799.
Richard Smith [Sun, 21 Jul 2013 23:13:17 +0000 (23:13 +0000)]
Test updates missed from r186799.

llvm-svn: 186800

11 years agoTighten up the set of operator new/operator delete calls we're permitted to
Richard Smith [Sun, 21 Jul 2013 23:12:18 +0000 (23:12 +0000)]
Tighten up the set of operator new/operator delete calls we're permitted to
optimize, to follow the permissions granted in N3664. Under those rules, only
calls generated by new-expressions and delete-expressions are permitted to be
optimized, and direct calls to ::operator new and ::operator delete must be
treated as normal calls.

llvm-svn: 186799

11 years agoTreat nothrow forms of ::operator delete and ::operator delete[] as
Richard Smith [Sun, 21 Jul 2013 23:11:42 +0000 (23:11 +0000)]
Treat nothrow forms of ::operator delete and ::operator delete[] as
deallocation functions.

llvm-svn: 186798

11 years agoConst-correct some iterators. No functional change.
Craig Topper [Sun, 21 Jul 2013 22:20:10 +0000 (22:20 +0000)]
Const-correct some iterators. No functional change.

llvm-svn: 186797

11 years agoReplace 'unsigned short' with 'uint16_t' in a packed data structure for consistency...
Craig Topper [Sun, 21 Jul 2013 21:56:18 +0000 (21:56 +0000)]
Replace 'unsigned short' with 'uint16_t' in a packed data structure for consistency with other fields and to be explicit about bit count.

llvm-svn: 186796

11 years agoRevert r186649 because it wasn't unnecessary and add a comment.
Craig Topper [Sun, 21 Jul 2013 18:58:40 +0000 (18:58 +0000)]
Revert r186649 because it wasn't unnecessary and add a comment.

llvm-svn: 186795

11 years agoConvert Sema::MatchTemplateParametersToScopeSpecifier to ArrayRef.
Robert Wilhelm [Sun, 21 Jul 2013 15:20:44 +0000 (15:20 +0000)]
Convert  Sema::MatchTemplateParametersToScopeSpecifier to ArrayRef.

llvm-svn: 186794

11 years agoreport unused-value warning also for warn_unused types
Lubos Lunak [Sun, 21 Jul 2013 13:15:58 +0000 (13:15 +0000)]
report unused-value warning also for warn_unused types

llvm-svn: 186793

11 years agoHandle replacement into a position past the original member.
Rafael Espindola [Sun, 21 Jul 2013 12:58:07 +0000 (12:58 +0000)]
Handle replacement into a position past the original member.

We were incorrectly computing where to insert a member if it was replacing
a previous member that was before the insert point.

llvm-svn: 186792

11 years agoRemove unused fields.
Rafael Espindola [Sun, 21 Jul 2013 12:42:16 +0000 (12:42 +0000)]
Remove unused fields.

llvm-svn: 186791

11 years agomem2reg: Minor STL usage cleanup. No functionality change.
Benjamin Kramer [Sun, 21 Jul 2013 11:03:40 +0000 (11:03 +0000)]
mem2reg: Minor STL usage cleanup. No functionality change.

llvm-svn: 186790

11 years agoclang-format: Smarter replacement in the vim integration.
Daniel Jasper [Sun, 21 Jul 2013 10:45:33 +0000 (10:45 +0000)]
clang-format: Smarter replacement in the vim integration.

With this fix, only changed regions will be replaced in vim's buffer.
Thereby, marks should mostly be left intact. Furthermore, this is a
better fix for the performance problem in conjunction with
'foldmethod=syntax' (see r186660).

llvm-svn: 186789

11 years agoMake the mem2reg interface use an ArrayRef as it keeps a copy of these
Chandler Carruth [Sun, 21 Jul 2013 08:37:58 +0000 (08:37 +0000)]
Make the mem2reg interface use an ArrayRef as it keeps a copy of these
to iterate over.

llvm-svn: 186788

11 years agoMark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.
Craig Topper [Sun, 21 Jul 2013 07:28:13 +0000 (07:28 +0000)]
Mark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.

llvm-svn: 186787

11 years agoRevert a part of r186420. Don't forbid multiple store chains that merge.
Nadav Rotem [Sun, 21 Jul 2013 06:12:57 +0000 (06:12 +0000)]
Revert a part of r186420. Don't forbid multiple store chains that merge.

llvm-svn: 186786

11 years agoFix exception demo: Add mcjit to link component.
Logan Chien [Sun, 21 Jul 2013 03:46:55 +0000 (03:46 +0000)]
Fix exception demo: Add mcjit to link component.

Fix exception demo when we are building the examples with configure/make.
This commit updates the link components in the Makefile.

llvm-svn: 186785

11 years agoHoist the rest of the logic for promoting single-store allocas into the
Chandler Carruth [Sun, 21 Jul 2013 01:52:33 +0000 (01:52 +0000)]
Hoist the rest of the logic for promoting single-store allocas into the
helper function. This leaves both trivial cases handled entirely in
helper functions and merely manages the list of allocas to process in
the run method.

The next step will be to handle all of the trivial promotion work prior
to even creating the core class and the subsequent simplifications that
enables.

llvm-svn: 186784

11 years agoHoist the rest of the logic for fully promoting allocas with all uses in
Chandler Carruth [Sun, 21 Jul 2013 01:44:07 +0000 (01:44 +0000)]
Hoist the rest of the logic for fully promoting allocas with all uses in
a single block into the helper routine. This takes advantage of the fact
that we can directly replace uses prior to any store with undef to
simplify matters and unconditionally promote allocas only used within
one block.

I've removed the special handling for the case of no stores existing.
This has no semantic effect but might slow things down. I'll fix that in
a later patch when I refactor this entire thing to be easier to manage
the different cases.

llvm-svn: 186783

11 years agoRemove a method made dead by the prior refactoring.
Chandler Carruth [Sun, 21 Jul 2013 00:01:34 +0000 (00:01 +0000)]
Remove a method made dead by the prior refactoring.

llvm-svn: 186782

11 years agoHoist the two trivial promotion routines out of the big class that
Chandler Carruth [Sat, 20 Jul 2013 23:59:51 +0000 (23:59 +0000)]
Hoist the two trivial promotion routines out of the big class that
handles the general cases.

The hope is to refactor this so that we don't end up building the entire
class for the trivial cases. I also want to lift a lot of the early
pre-processing in the initial segment of run() into a separate routine,
and really none of it needs to happen inside the primary promotion
class.

These routines in particular used none of the actual state in the
promotion class, so they don't really make sense as members.

llvm-svn: 186781

11 years agoHoist the AllocaInfo struct to the top of the file.
Chandler Carruth [Sat, 20 Jul 2013 23:39:26 +0000 (23:39 +0000)]
Hoist the AllocaInfo struct to the top of the file.

This struct is nicely independent of everything else, and we already
needed a foward declaration here. It's simpler to just define it
immediately.

llvm-svn: 186780

11 years agoSink a typedef and comparator down to the function that actually uses them.
Chandler Carruth [Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)]
Sink a typedef and comparator down to the function that actually uses them.

llvm-svn: 186779

11 years agoDon't crash when llvm.compiler.used becomes empty.
Rafael Espindola [Sat, 20 Jul 2013 23:33:15 +0000 (23:33 +0000)]
Don't crash when llvm.compiler.used becomes empty.

GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.

llvm-svn: 186778

11 years agoDon't allocate the DIBuilder on the heap and remove all the complexity
Chandler Carruth [Sat, 20 Jul 2013 23:33:06 +0000 (23:33 +0000)]
Don't allocate the DIBuilder on the heap and remove all the complexity
that ensued from that.

llvm-svn: 186777

11 years agoRename constructor parameters to follow the common member-shadowing
Chandler Carruth [Sat, 20 Jul 2013 23:23:47 +0000 (23:23 +0000)]
Rename constructor parameters to follow the common member-shadowing
pattern and conform to the naming conventions.

llvm-svn: 186776

11 years agoReformat the implementation of mem2reg with clang-format so that my
Chandler Carruth [Sat, 20 Jul 2013 23:20:08 +0000 (23:20 +0000)]
Reformat the implementation of mem2reg with clang-format so that my
subsequent changes don't introduce inconsistencies.

llvm-svn: 186775

11 years agoComment: try to clarify loop iteration order.
Andrew Trick [Sat, 20 Jul 2013 23:10:31 +0000 (23:10 +0000)]
Comment: try to clarify loop iteration order.

llvm-svn: 186774

11 years agoRemove a DenseMapInfo specialization for std::pair -- we have one of
Chandler Carruth [Sat, 20 Jul 2013 23:09:05 +0000 (23:09 +0000)]
Remove a DenseMapInfo specialization for std::pair -- we have one of
those baked into DenseMap now.

llvm-svn: 186773

11 years agoUpdate mem2reg's comments to conform to the new doxygen standards. No
Chandler Carruth [Sat, 20 Jul 2013 22:20:05 +0000 (22:20 +0000)]
Update mem2reg's comments to conform to the new doxygen standards. No
functionality changed.

llvm-svn: 186772

11 years ago[PECOFF] Fix use-after-free.
Rui Ueyama [Sat, 20 Jul 2013 21:00:47 +0000 (21:00 +0000)]
[PECOFF] Fix use-after-free.

llvm-svn: 186771

11 years agoAdded preproc callback for pragma directives.
Enea Zaffanella [Sat, 20 Jul 2013 20:09:11 +0000 (20:09 +0000)]
Added preproc callback for pragma directives.

llvm-svn: 186770

11 years agoAdd missing check for creating an instance of an abstract class through an
Richard Smith [Sat, 20 Jul 2013 19:41:36 +0000 (19:41 +0000)]
Add missing check for creating an instance of an abstract class through an
implicit conversion sequence.

llvm-svn: 186769

11 years agoUndisable a test for a c++98-compat warning for inheriting constructors now that...
Richard Smith [Sat, 20 Jul 2013 19:22:08 +0000 (19:22 +0000)]
Undisable a test for a c++98-compat warning for inheriting constructors now that we implement them.

llvm-svn: 186768

11 years agoDisallow global aliases to bitcast between address spaces
Matt Arsenault [Sat, 20 Jul 2013 17:46:05 +0000 (17:46 +0000)]
Disallow global aliases to bitcast between address spaces

llvm-svn: 186767

11 years agoRemove trailing whitespace, fix file path in comment
Matt Arsenault [Sat, 20 Jul 2013 17:46:00 +0000 (17:46 +0000)]
Remove trailing whitespace, fix file path in comment

llvm-svn: 186766

11 years agoadd type attribute warn_unused, for -Wunused-variable warnings (pr#14253)
Lubos Lunak [Sat, 20 Jul 2013 15:05:36 +0000 (15:05 +0000)]
add type attribute warn_unused, for -Wunused-variable warnings (pr#14253)

The functionality is equivalent to the GCC attribute. Variables of tagged
types will be warned about as unused if they are not used in any way
except for possible (even non-trivial) ctors/dtors called. Useful for tagging
classes like std::string (which is not part of this commit).

llvm-svn: 186765

11 years agoavoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)
Lubos Lunak [Sat, 20 Jul 2013 14:30:01 +0000 (14:30 +0000)]
avoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)

llvm-svn: 186764

11 years agofix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)
Lubos Lunak [Sat, 20 Jul 2013 14:23:27 +0000 (14:23 +0000)]
fix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)

Every #include is surrounded by #if 0 in order to comment it out, which adds
lines. That is fixed up right after, but that all can be inside #if part
that is not processed, so fix up also after every end of a conditional part.

llvm-svn: 186763

11 years agoSilence GCC warning for using both enum and unsigned in a ternary expr.
Benjamin Kramer [Sat, 20 Jul 2013 12:06:17 +0000 (12:06 +0000)]
Silence GCC warning for using both enum and unsigned in a ternary expr.

llvm-svn: 186762

11 years agoSROA: Microoptimization: Remove dead entries first, then sort.
Benjamin Kramer [Sat, 20 Jul 2013 08:38:34 +0000 (08:38 +0000)]
SROA: Microoptimization: Remove dead entries first, then sort.

While there replace an explicit struct with std::mem_fun.

llvm-svn: 186761

11 years agoDiagnosticIDs: Forbid Diag ID from being valid
David Majnemer [Sat, 20 Jul 2013 07:15:15 +0000 (07:15 +0000)]
DiagnosticIDs: Forbid Diag ID from being valid

Diag ID is used throughout clang as a sentinel id meaning "this is an
invalid diagnostic id."  Confusingly, Diag ID maps to a valid, usable,
diagnostic id.  Instead, start diagnostic ids at ID one.

Incidently, remove an unused element from StaticDiagInfo.

llvm-svn: 186760

11 years agoInstCombine: call FoldOpIntoSelect for all floating binops, not just fmul
Stephen Lin [Sat, 20 Jul 2013 07:13:13 +0000 (07:13 +0000)]
InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul

llvm-svn: 186759

11 years agoHave InlineCost check constant fcmps
Matt Arsenault [Sat, 20 Jul 2013 04:09:00 +0000 (04:09 +0000)]
Have InlineCost check constant fcmps

llvm-svn: 186758

11 years agoIf a default argument is a dependent type, get the real type from the desugared
Richard Trieu [Sat, 20 Jul 2013 03:49:02 +0000 (03:49 +0000)]
If a default argument is a dependent type, get the real type from the desugared
template.  Passing around dependent types can lead to integral arguments that
cannot be evaluated.

llvm-svn: 186757

11 years agoAdd Option unit tests to the make build
Hans Wennborg [Sat, 20 Jul 2013 03:04:36 +0000 (03:04 +0000)]
Add Option unit tests to the make build

Previously, they were only built and run in the CMake build.

llvm-svn: 186756

11 years ago[mach-o] factor out all cputype <-> arch conversions to one table driven location
Nick Kledzik [Sat, 20 Jul 2013 02:08:23 +0000 (02:08 +0000)]
[mach-o] factor out all cputype <-> arch conversions to one table driven location

llvm-svn: 186755

11 years agoFix bug in computing POD-for-layout.
Eli Friedman [Sat, 20 Jul 2013 01:06:31 +0000 (01:06 +0000)]
Fix bug in computing POD-for-layout.

A class with a field of non-POD-for-layout type is not POD-for-layout.
This computation should not depend on whether the field is of POD type
in the language sense.

Fixes PR16537.

Patch by Josh Magee.

llvm-svn: 186741

11 years agoUse -lines option instead of -offset/-length. This fixes problems with files using...
Alexander Kornienko [Sat, 20 Jul 2013 01:01:25 +0000 (01:01 +0000)]
Use -lines option instead of -offset/-length. This fixes problems with files using dos newlines (<CR><LF>).

llvm-svn: 186740

11 years ago[PECOFF][Driver] Add -base command line option.
Rui Ueyama [Sat, 20 Jul 2013 00:45:00 +0000 (00:45 +0000)]
[PECOFF][Driver] Add -base command line option.

llvm-svn: 186739

11 years agoMake IgnoreParens() look through ChooseExprs.
Eli Friedman [Sat, 20 Jul 2013 00:40:58 +0000 (00:40 +0000)]
Make IgnoreParens() look through ChooseExprs.

This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.

A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().

Fixes <rdar://problem/14438917>.

llvm-svn: 186738

11 years agoDebug Info Verifier: simplify DIxxx::Verify
Manman Ren [Sat, 20 Jul 2013 00:38:46 +0000 (00:38 +0000)]
Debug Info Verifier: simplify DIxxx::Verify

Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

llvm-svn: 186737

11 years agoFix size_t -> uint warnings with MSVC 64-bit build
Matt Arsenault [Sat, 20 Jul 2013 00:20:10 +0000 (00:20 +0000)]
Fix size_t -> uint warnings with MSVC 64-bit build

llvm-svn: 186736

11 years agoRefactor AnalyzeBranch on ARM. The previous version did not always analyze
Lang Hames [Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)]
Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll).

<rdar://problem/14464830>

llvm-svn: 186735

11 years agoRetry submitting r186623: COFFDumper: Dump data directory entries.
Rui Ueyama [Fri, 19 Jul 2013 23:23:29 +0000 (23:23 +0000)]
Retry submitting r186623: COFFDumper: Dump data directory entries.

The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.

llvm-svn: 186734

11 years agofix an 80-col line.
Nadav Rotem [Fri, 19 Jul 2013 23:14:01 +0000 (23:14 +0000)]
fix an 80-col line.

llvm-svn: 186733

11 years agoUse LLVMs ADTs that improve the compile time of this pass.
Nadav Rotem [Fri, 19 Jul 2013 23:12:19 +0000 (23:12 +0000)]
Use LLVMs ADTs that improve the compile time of this pass.

llvm-svn: 186732

11 years agoSLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions...
Nadav Rotem [Fri, 19 Jul 2013 23:11:15 +0000 (23:11 +0000)]
SLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions that check GEPs and eliminate two of the calls to accumulateConstantOffset.

llvm-svn: 186731

11 years agoFIXME fix: improving diagnostics for template arguments deduction of class templates...
Larisse Voufo [Fri, 19 Jul 2013 23:00:19 +0000 (23:00 +0000)]
FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations
    This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info.

llvm-svn: 186730

11 years agoRevert "Use function overloading instead of template specialization for diagnosis...
Larisse Voufo [Fri, 19 Jul 2013 22:53:23 +0000 (22:53 +0000)]
Revert "Use function overloading instead of template specialization for diagnosis of bad template argument deductions."

This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95.

llvm-svn: 186729

11 years agoFix pack instantiation with function types.
Eli Friedman [Fri, 19 Jul 2013 22:50:29 +0000 (22:50 +0000)]
Fix pack instantiation with function types.

Make sure we correctly expand packs which expand to another
pack in a function type.

llvm-svn: 186728

11 years agoUse function overloading instead of template specialization for diagnosis of bad...
Larisse Voufo [Fri, 19 Jul 2013 22:34:32 +0000 (22:34 +0000)]
Use function overloading instead of template specialization for diagnosis of bad template argument deductions.

llvm-svn: 186727

11 years agoCorrectly handle packs for variadic type traits.
Eli Friedman [Fri, 19 Jul 2013 21:49:32 +0000 (21:49 +0000)]
Correctly handle packs for variadic type traits.

I'm not sure how to write a test for this; the following shows the
difference in -ast-dump:

template <int x> struct A {};
template <class T> struct B { };
template <class ...Args> using C = A<(__is_trivially_constructible(Args...))>;
template <class ...Args> using D = C<B<Args>...>;

However, I can't seem to write a test that triggers a visible difference
in behavior.

llvm-svn: 186726

11 years agoR600: Don't emit empty then clause and use alu_pop_after
Vincent Lejeune [Fri, 19 Jul 2013 21:45:15 +0000 (21:45 +0000)]
R600: Don't emit empty then clause and use alu_pop_after

llvm-svn: 186725

11 years agoR600: Simplify AMDILCFGStructurize by removing templates and assuming single exit
Vincent Lejeune [Fri, 19 Jul 2013 21:45:06 +0000 (21:45 +0000)]
R600: Simplify AMDILCFGStructurize by removing templates and assuming single exit

llvm-svn: 186724

11 years agoR600: Replace legacy debug code in AMDILCFGStructurizer.cpp
Vincent Lejeune [Fri, 19 Jul 2013 21:44:56 +0000 (21:44 +0000)]
R600: Replace legacy debug code in AMDILCFGStructurizer.cpp

llvm-svn: 186723

11 years agoRemove trailing whitespace
Craig Topper [Fri, 19 Jul 2013 21:43:59 +0000 (21:43 +0000)]
Remove trailing whitespace

llvm-svn: 186722

11 years agoFix inserting new elements in a specified location.
Rafael Espindola [Fri, 19 Jul 2013 21:23:28 +0000 (21:23 +0000)]
Fix inserting new elements in a specified location.

We were only handling the 'a' and 'b' options during moves before.

llvm-svn: 186721

11 years agoAdd a cl.exe compatible driver mode
Hans Wennborg [Fri, 19 Jul 2013 20:33:20 +0000 (20:33 +0000)]
Add a cl.exe compatible driver mode

The mode doesn't actually do anything yet, but this provides a
way to get into it.

llvm-svn: 186720

11 years agoUse an i686 triple for this test now that it uses stdcall
Reid Kleckner [Fri, 19 Jul 2013 20:32:18 +0000 (20:32 +0000)]
Use an i686 triple for this test now that it uses stdcall

There seems to be a crash here if we have a calling convention attribute
that gets ignored and then we instantiate templates.

llvm-svn: 186719

11 years agoFix another place where clang check objc selector name instead of checking the select...
Jean-Daniel Dupas [Fri, 19 Jul 2013 20:25:56 +0000 (20:25 +0000)]
Fix another place where clang check objc selector name instead of checking the selector family

Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method.

CC: cfe-commits, eli.friedman
Differential Revision: http://llvm-reviews.chandlerc.com/D1163

llvm-svn: 186718

11 years agoReworked the test decorators to match the test results on the buildbots.
Ashok Thirumurthi [Fri, 19 Jul 2013 20:22:43 +0000 (20:22 +0000)]
Reworked the test decorators to match the test results on the buildbots.

llvm-svn: 186717

11 years agoObjectiveC migrator: Another use case of enum
Fariborz Jahanian [Fri, 19 Jul 2013 20:18:36 +0000 (20:18 +0000)]
ObjectiveC migrator: Another use case of enum
declaration which can be migrated to NS_ENUM.

llvm-svn: 186716

11 years agoAdd support for raw_ostream on the printing methods of Diagnostics.
Samuel Benzaquen [Fri, 19 Jul 2013 20:02:35 +0000 (20:02 +0000)]
Add support for raw_ostream on the printing methods of Diagnostics.

Summary:
Add printToStream*(llvm::raw_ostream&) methods to Diagnostics, and reimplement everything based on streams instead of concatenating strings.
Also, fix some functions to start with lowercase to match the style guide.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1187

llvm-svn: 186715

11 years agoCreate calling convention AttributedType sugar nodes
Reid Kleckner [Fri, 19 Jul 2013 19:51:03 +0000 (19:51 +0000)]
Create calling convention AttributedType sugar nodes

Canonical types are unchanged.  The type printer had to be changed to
avoid printing any non-default implicit calling convention as well as
the calling convention attribute.

Reviewers: rjmccall

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

llvm-svn: 186714

11 years agoFix for template substitution with packs.
Eli Friedman [Fri, 19 Jul 2013 19:40:38 +0000 (19:40 +0000)]
Fix for template substitution with packs.

When we see a pack, and replace it with a template argument which is
also a pack, we want to use the pack pattern, not the expanded pack.
The caller should take care of expanding the pack afterwards.

Fixes PR16646.

llvm-svn: 186713

11 years agoAdd another link to the Python API docs.
Daniel Malea [Fri, 19 Jul 2013 19:15:45 +0000 (19:15 +0000)]
Add another link to the Python API docs.

llvm-svn: 186712

11 years agoUpdate users manual to indicate:
Richard Smith [Fri, 19 Jul 2013 19:06:48 +0000 (19:06 +0000)]
Update users manual to indicate:
  1) clang++ must be used when linking C++ programs using -fsanitize=undefined, and
  2) MSan can't be combined with TSan or ASan.

llvm-svn: 186711

11 years ago[mips] Add support for command-line options -mno-check-zero-division and
Akira Hatanaka [Fri, 19 Jul 2013 18:58:48 +0000 (18:58 +0000)]
[mips] Add support for command-line options -mno-check-zero-division and
-mcheck-zero-division.

llvm-svn: 186710

11 years ago[arcmt] After checking is successful disable auto-synthesize to avoid "@synthesize...
Argyrios Kyrtzidis [Fri, 19 Jul 2013 18:57:15 +0000 (18:57 +0000)]
[arcmt] After checking is successful disable auto-synthesize to avoid "@synthesize of 'weak' property is only
allowed in ARC" errors.

rdar://14461559

llvm-svn: 186709

11 years agoReplace some existing type attribute diagnostics with a
Aaron Ballman [Fri, 19 Jul 2013 18:53:44 +0000 (18:53 +0000)]
Replace some existing type attribute diagnostics with a
single diagnostic that selects.  No functional changes intended.

llvm-svn: 186708

11 years agoAdd SourceRange to PPCallbacks::Defined callback.
John Thompson [Fri, 19 Jul 2013 18:50:04 +0000 (18:50 +0000)]
Add SourceRange to PPCallbacks::Defined callback.

llvm-svn: 186707

11 years agoUpdated the test suite to fix xpasses on the gcc buildbot primarily due to r186347...
Ashok Thirumurthi [Fri, 19 Jul 2013 18:46:55 +0000 (18:46 +0000)]
Updated the test suite to fix xpasses on the gcc buildbot primarily due to r186347 (thanks Greg!).
Your mileage may vary depending on the gcc and stl versions in use (see llvm.org/pr15301).

llvm-svn: 186706

11 years agos/compiler_used/compiler.used/.
Rafael Espindola [Fri, 19 Jul 2013 18:44:51 +0000 (18:44 +0000)]
s/compiler_used/compiler.used/.

We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

llvm-svn: 186705

11 years agoAdd some flag exclusion tests.
Reid Kleckner [Fri, 19 Jul 2013 18:05:13 +0000 (18:05 +0000)]
Add some flag exclusion tests.

llvm-svn: 186704

11 years ago[Option] Add inclusion and exclusion flags to option parsing
Reid Kleckner [Fri, 19 Jul 2013 18:04:57 +0000 (18:04 +0000)]
[Option] Add inclusion and exclusion flags to option parsing

Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1049

llvm-svn: 186703