platform/upstream/llvm.git
11 years agoNote that modules are supported for C/Objective-C, and have syntax in ObjC.
Douglas Gregor [Fri, 27 Sep 2013 21:23:28 +0000 (21:23 +0000)]
Note that modules are supported for C/Objective-C, and have syntax in ObjC.

llvm-svn: 191562

11 years agoClarifying doc about cross-compiling
Renato Golin [Fri, 27 Sep 2013 21:14:54 +0000 (21:14 +0000)]
Clarifying doc about cross-compiling

llvm-svn: 191561

11 years agodocs: Document CXXLiteralOperatorName and CXXUsingDirective
Justin Bogner [Fri, 27 Sep 2013 21:10:54 +0000 (21:10 +0000)]
docs: Document CXXLiteralOperatorName and CXXUsingDirective

llvm-svn: 191560

11 years agodocs: Remove note about Identifiers being used for C++ operators
Justin Bogner [Fri, 27 Sep 2013 21:10:51 +0000 (21:10 +0000)]
docs: Remove note about Identifiers being used for C++ operators

C++ operators are represented by CXXOperatorName now, which is already
documented.

llvm-svn: 191559

11 years agoMake SourceMgr::PrintMessage() testable and add unit tests
Dmitri Gribenko [Fri, 27 Sep 2013 21:09:25 +0000 (21:09 +0000)]
Make SourceMgr::PrintMessage() testable and add unit tests

llvm-svn: 191558

11 years agoRe-submit r191472 with a fix for big endian.
Rui Ueyama [Fri, 27 Sep 2013 21:04:00 +0000 (21:04 +0000)]
Re-submit r191472 with a fix for big endian.

llvm-objdump: Dump COFF import table if -private-headers option is given.
llvm-svn: 191557

11 years agoConvert ClangASTType::GetTypeName over to return a ConstString to be consistent with
Jim Ingham [Fri, 27 Sep 2013 20:59:37 +0000 (20:59 +0000)]
Convert ClangASTType::GetTypeName over to return a ConstString to be consistent with
the other "Get*TypeName" functions.

llvm-svn: 191556

11 years agoIf you erase while iterating, remember to update the iterator. Bug found by Carlo...
Jim Ingham [Fri, 27 Sep 2013 20:58:17 +0000 (20:58 +0000)]
If you erase while iterating, remember to update the iterator.  Bug found by Carlo Kok.

llvm-svn: 191555

11 years agoUpdate the help text.
Rafael Espindola [Fri, 27 Sep 2013 20:42:38 +0000 (20:42 +0000)]
Update the help text.

llvm-svn: 191554

11 years agoUpdate.
Bill Wendling [Fri, 27 Sep 2013 20:40:40 +0000 (20:40 +0000)]
Update.

llvm-svn: 191553

11 years agoInstCombine: Only foldSelectICmpAndOr for integer types
Justin Bogner [Fri, 27 Sep 2013 20:35:39 +0000 (20:35 +0000)]
InstCombine: Only foldSelectICmpAndOr for integer types

Currently foldSelectICmpAndOr asserts if the "or" involves a vector
containing several of the same power of two. We can easily avoid this by
only performing the fold on integer types, like foldSelectICmpAnd does.

Fixes <rdar://problem/15012516>

llvm-svn: 191552

11 years agoReplace -fobjc-default-synthesize-properties with disable-objc-default-synthesize...
Rafael Espindola [Fri, 27 Sep 2013 20:21:48 +0000 (20:21 +0000)]
Replace -fobjc-default-synthesize-properties with disable-objc-default-synthesize-properties.

We want the modern behavior most of the time, so inverting the option simplifies
the driver and the tests.

llvm-svn: 191551

11 years agoImplement N3760, support for the [[deprecated]] attribute.
Chandler Carruth [Fri, 27 Sep 2013 20:20:17 +0000 (20:20 +0000)]
Implement N3760, support for the [[deprecated]] attribute.

This motion appears to have consensus in the C++ committee and is
expected to be voted into the C++14 draft tomorrow during the formal
vote.

No extension warning in C++11 as attributes not specified in the
standard using the standard syntax in C++11 have implementation defined
meaning, and we define the meaning proposed for C++14.

There is one bug exposed as we do not warn on a deprecated template
specialization. I've left a FIXME in the test case and will dig into
that next.

Also, I will add a few more exhaustive test cases of the other features
specified for this attribute in a follow-up commit.

llvm-svn: 191550

11 years agoMark variable template implementation as complete. Nearly all of the credit
Richard Smith [Fri, 27 Sep 2013 20:19:41 +0000 (20:19 +0000)]
Mark variable template implementation as complete. Nearly all of the credit
here goes to Larisse Voufo.

llvm-svn: 191549

11 years agoVariable templates: handle instantiation of static data member templates
Richard Smith [Fri, 27 Sep 2013 20:14:12 +0000 (20:14 +0000)]
Variable templates: handle instantiation of static data member templates
appropriately, especially when they appear within class templates.

llvm-svn: 191548

11 years agoComment out links for papers that aren't up yet.
Richard Smith [Fri, 27 Sep 2013 19:55:03 +0000 (19:55 +0000)]
Comment out links for papers that aren't up yet.

llvm-svn: 191547

11 years ago[mips] Rewrite MipsTargetLowering::getAddr functions as template functions.
Akira Hatanaka [Fri, 27 Sep 2013 19:51:35 +0000 (19:51 +0000)]
[mips] Rewrite MipsTargetLowering::getAddr functions as template functions.

No intended functionality change.

llvm-svn: 191546

11 years agoDon't give suggest things like function names on the left side of "=".
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:16 +0000 (19:40 +0000)]
Don't give suggest things like function names on the left side of "=".

llvm-svn: 191545

11 years agoAvoid the hard-coded limit on the number of typo corrections attempted.
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:12 +0000 (19:40 +0000)]
Avoid the hard-coded limit on the number of typo corrections attempted.

Move some tests from typo-correction.cpp to typo-correction-pt2.cpp
because they were running afoul of the hard-coded limit of 20 typos
corrected. Some of the tests after it were still working due to the
limit not applying to cached corrections and in cases where a non-NULL
MemberContext is passed in to Sema::CorrectTypo.  Most of the moved tests
still passed after being moved, but the test involving "data_struct" had
only been passing because the test had exceeded that limit so a fix for
it is also included (most of the changes to ParseStmt.cpp are shared with
and originated from another typo correction impovement that was split
into a separate commit).

llvm-svn: 191544

11 years agoCache the location of failed typo corrections so that typo correction
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:08 +0000 (19:40 +0000)]
Cache the location of failed typo corrections so that typo correction
isn't repeatedly attempted for the same identifier at the same location.

llvm-svn: 191543

11 years agoFix typo: Dellocation.
Benjamin Kramer [Fri, 27 Sep 2013 19:35:09 +0000 (19:35 +0000)]
Fix typo: Dellocation.

llvm-svn: 191542

11 years agoFix formatting goof.
Richard Smith [Fri, 27 Sep 2013 19:12:22 +0000 (19:12 +0000)]
Fix formatting goof.

llvm-svn: 191541

11 years agoUpdate status:
Richard Smith [Fri, 27 Sep 2013 19:11:33 +0000 (19:11 +0000)]
Update status:
 * generic lambdas are now partially supported
 * add papers from formal motions in committee

llvm-svn: 191540

11 years agoAdding intrinsics to the llvm backend for TBM instruction set.
Yunzhong Gao [Fri, 27 Sep 2013 18:38:42 +0000 (18:38 +0000)]
Adding intrinsics to the llvm backend for TBM instruction set.
Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1750

llvm-svn: 191539

11 years agoTBAA: handle scalar TBAA format and struct-path aware TBAA format.
Manman Ren [Fri, 27 Sep 2013 18:34:27 +0000 (18:34 +0000)]
TBAA: handle scalar TBAA format and struct-path aware TBAA format.

Remove the command line argument "struct-path-tbaa" since we should not depend
on command line argument to decide which format the IR file is using. Instead,
we check the first operand of the tbaa tag node, if it is a MDNode, we treat
it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA
format.

When clang starts to use struct-path aware TBAA format no matter whether
struct-path-tbaa is no, and we can auto-upgrade existing bc files, the support
for scalar TBAA format can be dropped.

Existing testing cases are updated to use the struct-path aware TBAA format.

llvm-svn: 191538

11 years agoclang-cl: pass /FI options to fallback
Hans Wennborg [Fri, 27 Sep 2013 17:54:18 +0000 (17:54 +0000)]
clang-cl: pass /FI options to fallback

We started parsing /FI in r191442, and now we can pass it on to the
fallback too.

llvm-svn: 191537

11 years agoAdding pre/post conditions for some Replacement handling functions
Edwin Vane [Fri, 27 Sep 2013 17:52:45 +0000 (17:52 +0000)]
Adding pre/post conditions for some Replacement handling functions

The vector version of shiftedCodePosition() requires Replacements to be
in sorted order.

Turned existing comment about sorting for deduplicate() into an exact
post condition.

llvm-svn: 191536

11 years agoSourceManager: Open code isInMainFile.
Benjamin Kramer [Fri, 27 Sep 2013 17:12:50 +0000 (17:12 +0000)]
SourceManager: Open code isInMainFile.

- We really shouldn't compute line numbers for every file that is asked if it's
  the main file, it destroys the lazy computation.
- Invalid locations are no longer accounted to the main file, no other
  functionality change.

llvm-svn: 191535

11 years agoQuick-fix the test for no-asserts build
Timur Iskhodzhanov [Fri, 27 Sep 2013 17:07:56 +0000 (17:07 +0000)]
Quick-fix the test for no-asserts build

llvm-svn: 191534

11 years agoRemove method that always returns true.
Rafael Espindola [Fri, 27 Sep 2013 16:58:26 +0000 (16:58 +0000)]
Remove method that always returns true.

llvm-svn: 191533

11 years ago[analyzer] Allow pre/post-statement checkers for UnaryOperator.
Jordan Rose [Fri, 27 Sep 2013 16:47:52 +0000 (16:47 +0000)]
[analyzer] Allow pre/post-statement checkers for UnaryOperator.

Found by Arthur Yoo.

llvm-svn: 191532

11 years agoFix the test files by removing the unnecessary -emit-llvm flag (should address Matt...
Faisal Vali [Fri, 27 Sep 2013 16:45:48 +0000 (16:45 +0000)]
Fix the test files by removing the unnecessary -emit-llvm flag (should address Matt Beaumont-Gay's concern regarding failure on a read-only filesystem)

llvm-svn: 191531

11 years agoAdded a comment and another test for the UT_ForIndentation option
Alexander Kornienko [Fri, 27 Sep 2013 16:40:11 +0000 (16:40 +0000)]
Added a comment and another test for the UT_ForIndentation option

llvm-svn: 191530

11 years agoUpdated examples of UseTab option
Alexander Kornienko [Fri, 27 Sep 2013 16:19:25 +0000 (16:19 +0000)]
Updated examples of UseTab option

llvm-svn: 191529

11 years agoUpdated clang-format style options doc.
Alexander Kornienko [Fri, 27 Sep 2013 16:16:55 +0000 (16:16 +0000)]
Updated clang-format style options doc.

llvm-svn: 191528

11 years agoImplemented tab usage only for indentation (http://llvm.org/PR17363)
Alexander Kornienko [Fri, 27 Sep 2013 16:14:22 +0000 (16:14 +0000)]
Implemented tab usage only for indentation (llvm.org/PR17363)

Summary:
Changed UseTab to be a enum with three options: Never, Always,
ForIndentation (true/false are still supported when reading .clang-format).
IndentLevel should currently be propagated correctly for all tokens, except for
block comments. Please take a look at the general idea before I start dealing
with block comments.

Reviewers: klimek, djasper

Reviewed By: klimek

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

llvm-svn: 191527

11 years agoTransforms: Use getFirstNonPHI to set the insertion point for PHIs
Justin Bogner [Fri, 27 Sep 2013 15:30:25 +0000 (15:30 +0000)]
Transforms: Use getFirstNonPHI to set the insertion point for PHIs

We were previously using getFirstInsertionPt to insert PHI
instructions when vectorizing, but getFirstInsertionPt also skips past
landingpads, causing this to generate invalid IR.

We can avoid this issue by using getFirstNonPHI instead.

llvm-svn: 191526

11 years ago[SystemZ] Rein back the use of block operations
Richard Sandiford [Fri, 27 Sep 2013 15:29:20 +0000 (15:29 +0000)]
[SystemZ] Rein back the use of block operations

The backend tries to use block operations like MVC, NC, OC and XC for
simple scalar operations.  For correctness reasons, it rejects any case
in which the regions might partially overlap.  However, for performance
reasons, it should also reject cases where the regions might be equal,
since the instruction might then not use the fast path.

This fixes a performance regression seen in bzip2.  We may want to limit
the optimisation even more in future, or even remove it entirely, but I'll
try with this for now.

llvm-svn: 191525

11 years ago[SystemZ] Improve handling of PC-relative addresses
Richard Sandiford [Fri, 27 Sep 2013 15:14:04 +0000 (15:14 +0000)]
[SystemZ] Improve handling of PC-relative addresses

The backend previously folded offsets into PC-relative addresses
whereever possible.  That's the right thing to do when the address
can be used directly in a PC-relative memory reference (using things
like LRL).  But if we have a register-based memory reference and need
to load the PC-relative address separately, it's better to use an anchor
point that could be shared with other accesses to the same area of the
variable.

Fixes a FIXME.

llvm-svn: 191524

11 years agoAbstract out the emission of vtables, add basic support for vtable emission when...
Timur Iskhodzhanov [Fri, 27 Sep 2013 14:48:01 +0000 (14:48 +0000)]
Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1532

llvm-svn: 191523

11 years ago[LSan] Don't report leaks with single-frame stack traces
Alexey Samsonov [Fri, 27 Sep 2013 13:54:20 +0000 (13:54 +0000)]
[LSan] Don't report leaks with single-frame stack traces

llvm-svn: 191522

11 years ago[mips][msa] Implemented insert.d intrinsic.
Daniel Sanders [Fri, 27 Sep 2013 13:36:54 +0000 (13:36 +0000)]
[mips][msa] Implemented insert.d intrinsic.

This intrinsic is lowered into an equivalent INSERT_VECTOR_ELT which is
further lowered into a sequence of insert.w's on MIPS32.

llvm-svn: 191521

11 years agoARM: Teach assembler to enforce constraints for ARM LDRD destination register operands.
Tilmann Scheller [Fri, 27 Sep 2013 13:28:17 +0000 (13:28 +0000)]
ARM: Teach assembler to enforce constraints for ARM LDRD destination register operands.

As specified in A8.8.72/A8.8.73/A8.8.74 in the ARM ARM, all variants of the ARM LDRD instruction have the following two constraints:

LDRD<c> <Rt>, <Rt2>, ...

(a) Rt must be even-numbered and not r14
(b) Rt2 must be R(t+1)

If those two constraints are not met the result of executing the instruction will be unpredictable.

Constraint (b) was already enforced, this commit adds support for constraint (a).

Fixes rdar://14479793.

llvm-svn: 191520

11 years ago[mips][msa] Implemented fill.d intrinsic.
Daniel Sanders [Fri, 27 Sep 2013 13:20:41 +0000 (13:20 +0000)]
[mips][msa] Implemented fill.d intrinsic.

This intrinsic is lowered into an equivalent BUILD_VECTOR which is further
lowered into a sequence of insert.w's on MIPS32.

llvm-svn: 191519

11 years ago[mips][msa] Implemented copy_[us].d intrinsic.
Daniel Sanders [Fri, 27 Sep 2013 13:04:21 +0000 (13:04 +0000)]
[mips][msa] Implemented copy_[us].d intrinsic.

This intrinsic is lowered into equivalent copy_s.w instructions during
legalization.

llvm-svn: 191518

11 years ago[mips][msa] Rename arguments to MSA_INSERT_DESC_BASE to better match their expected...
Daniel Sanders [Fri, 27 Sep 2013 12:45:08 +0000 (12:45 +0000)]
[mips][msa] Rename arguments to MSA_INSERT_DESC_BASE to better match their expected values.

No functional change.

llvm-svn: 191517

11 years ago[sanitizer] Intercept backtrace, backtrace_symbols.
Evgeniy Stepanov [Fri, 27 Sep 2013 12:40:23 +0000 (12:40 +0000)]
[sanitizer] Intercept backtrace, backtrace_symbols.

llvm-svn: 191516

11 years ago[mips][msa] Implemented insert_vector_elt for v4f32 and v2f64.
Daniel Sanders [Fri, 27 Sep 2013 12:31:32 +0000 (12:31 +0000)]
[mips][msa] Implemented insert_vector_elt for v4f32 and v2f64.

For v4f32 and v2f64, INSERT_VECTOR_ELT is matched by a pseudo-insn which is
later expanded to appropriate insve.[wd] insns.

llvm-svn: 191515

11 years ago[mips][msa] Implemented extract_vector_elt for v4f32 or v2f64
Daniel Sanders [Fri, 27 Sep 2013 12:17:32 +0000 (12:17 +0000)]
[mips][msa] Implemented extract_vector_elt for v4f32 or v2f64

For v4f32 and v2f64, EXTRACT_VECTOR_ELT is matched by a pseudo-insn which may
be expanded to subregister copies and/or instructions as appropriate.

llvm-svn: 191514

11 years agoRemove superfluous comment accidentally checked-in.
Andrea Di Biagio [Fri, 27 Sep 2013 12:13:58 +0000 (12:13 +0000)]
Remove superfluous comment accidentally checked-in.

llvm-svn: 191513

11 years ago[mips][msa] Added support for MSA registers to copyPhysReg
Daniel Sanders [Fri, 27 Sep 2013 12:03:51 +0000 (12:03 +0000)]
[mips][msa] Added support for MSA registers to copyPhysReg

llvm-svn: 191512

11 years ago[mips][msa] Added support for matching splati from normal IR (i.e. not intrinsics)
Daniel Sanders [Fri, 27 Sep 2013 11:48:57 +0000 (11:48 +0000)]
[mips][msa] Added support for matching splati from normal IR (i.e. not intrinsics)

Updated some of the vshf since they (correctly) emit splati's now

llvm-svn: 191511

11 years ago[asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack...
Kostya Serebryany [Fri, 27 Sep 2013 11:37:23 +0000 (11:37 +0000)]
[asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file

llvm-svn: 191510

11 years agoRe-apply the change from r191393 with fix for pr17380.
Andrea Di Biagio [Fri, 27 Sep 2013 11:37:05 +0000 (11:37 +0000)]
Re-apply the change from r191393 with fix for pr17380.

This change fixes the problem reported in pr17380 and re-add the dagcombine
transformation ensuring that the value types are always legal if the
transformation is triggered after Legalization took place.

Added the test case from pr17380.

llvm-svn: 191509

11 years ago[msan] Unpoison argument shadow for C++ module destructors.
Evgeniy Stepanov [Fri, 27 Sep 2013 11:32:21 +0000 (11:32 +0000)]
[msan] Unpoison argument shadow for C++ module destructors.

Fixes PR17377.

llvm-svn: 191508

11 years ago[mips][msa] Added MSA.txt to describe instruction selection quirks.
Daniel Sanders [Fri, 27 Sep 2013 10:42:22 +0000 (10:42 +0000)]
[mips][msa] Added MSA.txt to describe instruction selection quirks.

This file contains notes about the instruction selection for MSA. For example,
it notes that ilvl.d is cannot be selected because ilvev.d covers the same
cases and is selected instead of ilvl.d.

llvm-svn: 191507

11 years agoFirst attempt to import OpenMP runtime
Jim Cownie [Fri, 27 Sep 2013 10:38:44 +0000 (10:38 +0000)]
First attempt to import OpenMP runtime

llvm-svn: 191506

11 years agoFix comment.
Tilmann Scheller [Fri, 27 Sep 2013 10:38:11 +0000 (10:38 +0000)]
Fix comment.

llvm-svn: 191505

11 years agoARM: Teach assembler to enforce constraint for Thumb2 LDRD (literal/immediate) destin...
Tilmann Scheller [Fri, 27 Sep 2013 10:30:18 +0000 (10:30 +0000)]
ARM: Teach assembler to enforce constraint for Thumb2 LDRD (literal/immediate) destination register operands.

LDRD<c> <Rt>, <Rt2>, <label>
LDRD<c> <Rt>, <Rt2>, [<Rn>{, #+/-<imm>}]
LDRD<c> <Rt>, <Rt2>, [<Rn>], #+/-<imm>
LDRD<c> <Rt>, <Rt2>, [<Rn>, #+/-<imm>]!

As specified in A8.8.72/A8.8.73 in the ARM ARM, the T1 encoding has a constraint which enforces that Rt != Rt2.

If this constraint is not met the result of executing the instruction will be unpredictable.

Fixes rdar://14479780.

llvm-svn: 191504

11 years ago[mips][msa] Tidy up
Daniel Sanders [Fri, 27 Sep 2013 10:25:41 +0000 (10:25 +0000)]
[mips][msa] Tidy up

lowerMSABinaryIntr, lowerMSABinaryImmIntr, lowerMSABranchIntr,
and lowerMSAUnaryIntr were trivially small functions. Inlined them into
their callers.

lowerMSASplat now takes its callers SDLoc instead of making a new one.

No functional change.

llvm-svn: 191503

11 years agoCreate directory for OpenMP runtime
Jim Cownie [Fri, 27 Sep 2013 10:09:23 +0000 (10:09 +0000)]
Create directory for OpenMP runtime

llvm-svn: 191500

11 years ago[mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error...
Daniel Sanders [Fri, 27 Sep 2013 10:08:31 +0000 (10:08 +0000)]
[mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error when using it in FR=0 mode.

llvm-svn: 191498

11 years agoCorrectly indent with tabs when whitespace starts from the column not divisible by...
Alexander Kornienko [Fri, 27 Sep 2013 09:45:40 +0000 (09:45 +0000)]
Correctly indent with tabs when whitespace starts from the column not divisible by TabWidth.

Summary:
The width of the first inserted tab character depends on the initial
column, so we need to handle the first tab in a special manner.

Reviewers: klimek, djasper

Reviewed By: klimek

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

llvm-svn: 191497

11 years ago[mips][msa] Expand all truncstores and loadexts for MSA as well as DSP
Daniel Sanders [Fri, 27 Sep 2013 09:44:59 +0000 (09:44 +0000)]
[mips][msa] Expand all truncstores and loadexts for MSA as well as DSP

llvm-svn: 191496

11 years ago[mips][msa] Added missing check in performSRACombine
Daniel Sanders [Fri, 27 Sep 2013 09:25:29 +0000 (09:25 +0000)]
[mips][msa] Added missing check in performSRACombine

Reviewers: jacksprat, dsanders

Reviewed By: dsanders

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

llvm-svn: 191495

11 years agoclang-format: Improve formatting of functions with multiple trailing tokens.
Daniel Jasper [Fri, 27 Sep 2013 08:29:16 +0000 (08:29 +0000)]
clang-format: Improve formatting of functions with multiple trailing tokens.

Before:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override
  final;

After:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override final;

llvm-svn: 191494

11 years agoAST: Handle multidimensional arrays inside of __uuidof()
David Majnemer [Fri, 27 Sep 2013 07:57:34 +0000 (07:57 +0000)]
AST: Handle multidimensional arrays inside of __uuidof()

We previously handled one-dimensional arrays but didn't consider the
general case.  The fix is simple: keep going through subsequent
dimensions until we get to the base element.

llvm-svn: 191493

11 years agoclang-format: Fix formatting bug with comment in weird place.
Daniel Jasper [Fri, 27 Sep 2013 07:49:08 +0000 (07:49 +0000)]
clang-format: Fix formatting bug with comment in weird place.

Before:
  template <typename T>
  // T should be one of {A, B}.
      void f() {}

After:
  template <typename T>
  // T should be one of {A, B}.
  void f() {}

llvm-svn: 191492

11 years agoFirst check in. Modified a comment.
Puyan Lotfi [Fri, 27 Sep 2013 07:36:10 +0000 (07:36 +0000)]
First check in. Modified a comment.

llvm-svn: 191491

11 years agoPut HasAVX512 predicate on some patterns to properly disable them when AVX512 isn...
Craig Topper [Fri, 27 Sep 2013 07:20:47 +0000 (07:20 +0000)]
Put HasAVX512 predicate on some patterns to properly disable them when AVX512 isn't enabled. Currently it works simply because the SSE and AVX version of the same patterns are checked first in the DAG isel table.

llvm-svn: 191490

11 years agoSwitch HasAVX to UseAVX in one spot to ensure that AVX512 form of VINSERTPS is used...
Craig Topper [Fri, 27 Sep 2013 07:16:24 +0000 (07:16 +0000)]
Switch HasAVX to UseAVX in one spot to ensure that AVX512 form of VINSERTPS is used in AVX512 mode.

llvm-svn: 191489

11 years agoRemoval some duplicate patterns.
Craig Topper [Fri, 27 Sep 2013 07:11:17 +0000 (07:11 +0000)]
Removal some duplicate patterns.

llvm-svn: 191488

11 years agoAST: Handle qualified array types in typeid() expressions
David Majnemer [Fri, 27 Sep 2013 07:04:31 +0000 (07:04 +0000)]
AST: Handle qualified array types in typeid() expressions

The intent of getTypeOperand() was to yield an unqualified type.
However QualType::getUnqualifiedType() does not strip away qualifiers on
arrays.

N.B.  This worked fine when typeid() was applied to an expression
because we would inject as implicit cast to the unqualified array type
in the AST.

llvm-svn: 191487

11 years agoAdd -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
Nick Lewycky [Fri, 27 Sep 2013 05:06:31 +0000 (05:06 +0000)]
Add -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
both flags to the driver test.

llvm-svn: 191486

11 years agoNumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompil...
NAKAMURA Takumi [Fri, 27 Sep 2013 04:42:28 +0000 (04:42 +0000)]
NumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompilation.

Investigating yet. It seems msc16 miscompiles s[1] to be folded.

llvm-svn: 191485

11 years agoSema: Respect -fdelayed-template-parsing when parsing constexpr functions
David Majnemer [Fri, 27 Sep 2013 04:14:12 +0000 (04:14 +0000)]
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions

Functions declared as constexpr must have their parsing delayed in
-fdelayed-template-parsing mode so as not to upset later template
instantiation.

N.B. My reading of the standard makes it seem like delayed template
parsing is at odds with constexpr.  We may want to make refinements in
other places in clang to make constexpr play nicer with this feature.

This fixes PR17334.

llvm-svn: 191484

11 years agoRemove some stray underscores from copyright block. Fix first line length to match...
Craig Topper [Fri, 27 Sep 2013 03:57:18 +0000 (03:57 +0000)]
Remove some stray underscores from copyright block. Fix first line length to match length of the one after the copyright block.

llvm-svn: 191483

11 years agotsan: support allocator_may_return_null flag
Dmitry Vyukov [Fri, 27 Sep 2013 02:31:23 +0000 (02:31 +0000)]
tsan: support allocator_may_return_null flag
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=29

llvm-svn: 191482

11 years agoFixing Intel format of the vshufpd instruction.
Yunzhong Gao [Fri, 27 Sep 2013 01:44:23 +0000 (01:44 +0000)]
Fixing Intel format of the vshufpd instruction.
Phabricator code review is located at: http://llvm-reviews.chandlerc.com/D1759

llvm-svn: 191481

11 years agoRevert "llvm-objdump: Dump COFF import table if -private-headers option is given."
Rui Ueyama [Fri, 27 Sep 2013 01:29:36 +0000 (01:29 +0000)]
Revert "llvm-objdump: Dump COFF import table if -private-headers option is given."

This reverts commit r191472 because it's failing on BE machine.

llvm-svn: 191480

11 years agoRevert "[PECOFF] Add a test for the import table."
Rui Ueyama [Fri, 27 Sep 2013 01:26:53 +0000 (01:26 +0000)]
Revert "[PECOFF] Add a test for the import table."

This reverts r191469 because the original patch this one depends on (r191472)
was reverted.

llvm-svn: 191479

11 years agoFactor the code that was eliminating redundant breakpoint locations and moving
Jim Ingham [Fri, 27 Sep 2013 01:16:58 +0000 (01:16 +0000)]
Factor the code that was eliminating redundant breakpoint locations and moving
line breakpoints past the prologue of functions so it can be shared between the
file & line breakpoint resolver, and the source pattern breakpoint resolver,
and then share it.

llvm-svn: 191478

11 years agoDWARF says line number 0 is a valid line number - used to indicate a source line...
Jim Ingham [Fri, 27 Sep 2013 01:15:46 +0000 (01:15 +0000)]
DWARF says line number 0 is a valid line number - used to indicate a source line that should
not have breakpoints set on it inserted into code that does have a valid line number.  So allow
that line number, and the ThreadPlanStepRange should just continue stepping over 0 line ranges
as if they had the same line number as whatever we were previously stepping through.

llvm-svn: 191477

11 years agoRemove unnecessary checks for thread_plan_sp (we check for this at the top of the...
Jim Ingham [Fri, 27 Sep 2013 01:13:01 +0000 (01:13 +0000)]
Remove unnecessary checks for thread_plan_sp (we check for this at the top of the function.)

llvm-svn: 191476

11 years ago[PECOFF] Add a test for the import table.
Rui Ueyama [Fri, 27 Sep 2013 00:56:37 +0000 (00:56 +0000)]
[PECOFF] Add a test for the import table.

llvm-svn: 191475

11 years agoFix another -Wnon-pod-varargs error in r191472.
Rui Ueyama [Fri, 27 Sep 2013 00:53:07 +0000 (00:53 +0000)]
Fix another -Wnon-pod-varargs error in r191472.

llvm-svn: 191474

11 years agoFix -Wnon-pod-varargs error in r191472.
Rui Ueyama [Fri, 27 Sep 2013 00:20:53 +0000 (00:20 +0000)]
Fix -Wnon-pod-varargs error in r191472.

llvm-svn: 191473

11 years agollvm-objdump: Dump COFF import table if -private-headers option is given.
Rui Ueyama [Fri, 27 Sep 2013 00:07:01 +0000 (00:07 +0000)]
llvm-objdump: Dump COFF import table if -private-headers option is given.

This is a patch to add capability to llvm-objdump to dump COFF Import Table
entries, so that we can write tests for LLD checking Import Table contents.

llvm-objdump did not print anything but just file name if the format is COFF
and -private-headers option is given. This is a patch adds capability for
dumping DLL Import Table, which is specific to the COFF format.

In this patch I defined a new iterator to iterate over import table entries.
Also added a few functions to COFFObjectFile.cpp to access fields of the entry.

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

llvm-svn: 191472

11 years agoMCParser/Debug info: Accept line number 0 as a legitimate value, since
Adrian Prantl [Thu, 26 Sep 2013 23:37:11 +0000 (23:37 +0000)]
MCParser/Debug info: Accept line number 0 as a legitimate value, since
CFE produces it to indicate artificial locations.
c.f.: DWARF standard, Table 6.2:
line -- An unsigned integer indicating a source line number. Lines are numbered beginning at 1. The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line.

llvm-svn: 191471

11 years agoMark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Matt Kopec [Thu, 26 Sep 2013 23:30:59 +0000 (23:30 +0000)]
Mark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Fix TestFrames.py error to check against a None pc value.

llvm-svn: 191470

11 years ago[PECOFF] Enable input file logging if /debug is given.
Rui Ueyama [Thu, 26 Sep 2013 22:46:04 +0000 (22:46 +0000)]
[PECOFF] Enable input file logging if /debug is given.

llvm-svn: 191469

11 years agoObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Thu, 26 Sep 2013 22:43:41 +0000 (22:43 +0000)]
ObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
on class methods, as it makes no sense. // rdar://15069200

llvm-svn: 191468

11 years ago[ELF] Add COPY relocations.
Michael J. Spencer [Thu, 26 Sep 2013 22:09:16 +0000 (22:09 +0000)]
[ELF] Add COPY relocations.

llvm-svn: 191467

11 years ago[Core] Add type and size to SharedLibraryAtom.
Michael J. Spencer [Thu, 26 Sep 2013 22:08:43 +0000 (22:08 +0000)]
[Core] Add type and size to SharedLibraryAtom.

llvm-svn: 191466

11 years agoObjectiveC migrator: function pointer is not an
Fariborz Jahanian [Thu, 26 Sep 2013 21:43:47 +0000 (21:43 +0000)]
ObjectiveC migrator: function pointer is not an
inner pointer for annotation to
objc_returns_inner_pointer purposes.
// rdar://15044991

llvm-svn: 191465

11 years agoDebug info: Fix a crash when trying to construct a type with redundant
Adrian Prantl [Thu, 26 Sep 2013 21:35:50 +0000 (21:35 +0000)]
Debug info: Fix a crash when trying to construct a type with redundant
ownership qualifiers.
Fixes rdar://problem/14990656.

llvm-svn: 191463

11 years agoRemove an unused variable - thanks to Nick Lewycky for pointing this out!
Faisal Vali [Thu, 26 Sep 2013 21:32:23 +0000 (21:32 +0000)]
Remove an unused variable - thanks to Nick Lewycky for pointing this out!

llvm-svn: 191462

11 years ago[mips][msa] Direct Object Emission for 3RF instructions.
Jack Carter [Thu, 26 Sep 2013 21:31:43 +0000 (21:31 +0000)]
[mips][msa] Direct Object Emission for 3RF instructions.

Patch by Matheus Almeida

llvm-svn: 191461

11 years ago[mips][msa] Updates encoding of 3RF instructions to match the latest revision of...
Jack Carter [Thu, 26 Sep 2013 21:18:57 +0000 (21:18 +0000)]
[mips][msa] Updates encoding of 3RF instructions to match the latest revision of the MSA spec (1.06).

This does not affect any of the existing output.

Patch by Matheus Almeida

llvm-svn: 191460

11 years agoFix error recovery when a return type correction includes a new name specifier.
Kaelyn Uhrain [Thu, 26 Sep 2013 21:13:05 +0000 (21:13 +0000)]
Fix error recovery when a return type correction includes a new name specifier.

llvm-svn: 191459