Commit Graph

152387 Commits

Author SHA1 Message Date
Nico Weber 9096fc0dab Run clang-format on lib/Format code after r184894. No other changes.
llvm-svn: 184896
2013-06-26 00:30:14 +00:00
Chandler Carruth fa95cc916f Fix a use after free I introduced and that Bill caught in code review
(thanks!) by deferring the free of the filename until we finish writing
the coverage data to that file.

Bill, let me know if you'd prefer a different approach!

llvm-svn: 184895
2013-06-26 00:26:16 +00:00
Nico Weber 8084cffd0b Formatter: Don't put a space after parameter-naming block comments.
Before: f(a, b, /*doFoo=*/ false);
Now: f(a, b, /*doFoo=*/false);

This style is a lot more common:
$ ack -H '=\*\/\w' lib | wc -l 
    1281
$ ack -H '=\*\/ \w' lib | wc -l 
      70

llvm-svn: 184894
2013-06-26 00:15:19 +00:00
Enrico Granata b4675a4e12 <rdar://problem/14266411>
The semi-unofficial way of returning a status from a Python command was to return a string (e.g. return "no such variable was found") that LLDB would pick as a clue of an error having happened

This checkin changes that:
- SBCommandReturnObject now exports a SetError() call, which can take an SBError or a plain C-string
- script commands now drop any return value and expect the SBCommandReturnObject ("return object") to be filled in appropriately - if you do nothing, a success will be assumed

If your commands were relying on returning a value and having LLDB pick that up as an error, please change your commands to SetError() through the return object or expect changes in behavior

llvm-svn: 184893
2013-06-25 23:43:28 +00:00
Adrian Prantl cc077ad634 s/C++0x/C++11/
llvm-svn: 184892
2013-06-25 23:42:37 +00:00
Jakob Stoklund Olesen e22476a923 Merge isReachable into isBackedge.
Prefer using RPO.lookup() instead of RPO[] which can mutate the map.

llvm-svn: 184891
2013-06-25 23:32:10 +00:00
Nick Lewycky 7a2a4799d6 Don't check for triviality on fields of templated records. We can't know the
answer until after instantiation. Fixes PR16061!

llvm-svn: 184890
2013-06-25 23:22:23 +00:00
David Majnemer 502b0ed264 Implement DR136
Friend declarations that specify a default argument must be a definition
and the only declaration in the translation unit.

llvm-svn: 184889
2013-06-25 23:09:30 +00:00
Nadav Rotem 0794acc1da SLPVectorizer: support slp-vectorization of PHINodes between basic blocks
llvm-svn: 184888
2013-06-25 23:04:09 +00:00
Richard Smith 71bdbb0101 Make this test properly test both things it's trying to test.
llvm-svn: 184887
2013-06-25 22:37:05 +00:00
Sean Callanan 6b2f22de5e Fixed a bug in ClangASTSource where we would return
the target of a typedef when asked for a typedef.

llvm-svn: 184886
2013-06-25 22:36:17 +00:00
Richard Smith ffe9da0136 Missing test update from r184884.
llvm-svn: 184885
2013-06-25 22:22:42 +00:00
Richard Smith b80d54049b PR8302: Check for shadowing a template parameter when declaring a template
template parameter.

llvm-svn: 184884
2013-06-25 22:21:36 +00:00
Matt Beaumont-Gay 35779955b3 Don't try to get the layout of an invalid decl in getDeclAlign.
When the decl that we're getting alignment for is a FieldDecl, and the field's
parent record is invalid, skip the actual field alignment calculation (and
return 1-byte alignment in the general case).

Also, assert in in getASTRecordLayout that the decl is valid. This was
inspired by PR16292; see also r184581 and r184751.

llvm-svn: 184883
2013-06-25 22:19:15 +00:00
David Majnemer ba8f17ac10 Implement DR21
A default template-argument shall not be specified in a friend template
declaration.

Interestingly, we properly handled default template arguments on friend
class members but not on just friend classes.

llvm-svn: 184882
2013-06-25 22:08:55 +00:00
Jakob Stoklund Olesen 6e630d46d2 Print block frequencies in decimal form.
This is easier to read than the internal fixed-point representation.

If anybody knows the correct algorithm for converting fixed-point
numbers to base 10, feel free to fix it.

llvm-svn: 184881
2013-06-25 21:57:38 +00:00
Tom Stellard 02661d9605 R600: Use new getNamedOperandIdx function generated by TableGen
llvm-svn: 184880
2013-06-25 21:22:18 +00:00
Tom Stellard b162d94871 TableGen: Generate a function for getting operand indices based on their defined names
This patch modifies TableGen to generate a function in
${TARGET}GenInstrInfo.inc called getNamedOperandIdx(), which can be used
to look up indices for operands based on their names.

In order to activate this feature for an instruction, you must set the
UseNamedOperandTable bit.

For example, if you have an instruction like:

def ADD : TargetInstr <(outs GPR:$dst), (ins GPR:$src0, GPR:$src1)>;

You can look up the operand indices using the new function, like this:

Target::getNamedOperandIdx(Target::ADD, Target::OpName::dst)  => 0
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src0) => 1
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src1) => 2

The operand names are case sensitive, so $dst and $DST are considered
different operands.

This change is useful for R600 which has instructions with a large number
of operands, many of which model single bit instruction configuration
values.  These configuration bits are common across most instructions,
but may have a different operand index depending on the instruction type.
It is useful to have a convenient way to look up the operand indices,
so these bits can be generically set on any instruction.

llvm-svn: 184879
2013-06-25 21:22:09 +00:00
Bill Wendling 90c38bcf58 Don't use 'errno.h' on Apple just yet. This breaks for some of our buildbots.
llvm-svn: 184878
2013-06-25 21:08:40 +00:00
Daniel Malea 795cc3afc3 Fix undefined behaviour in data formatter test -- ensure char* null-terminated
so LLDB does not read off the end of the array.

llvm-svn: 184877
2013-06-25 20:54:24 +00:00
Ed Maste 2f0d590713 Update version sscanf to match FreeBSD release info
Release strings are of the form 9.1-RELEASE-p3 or 10.0-CURRENT.

llvm-svn: 184876
2013-06-25 20:50:07 +00:00
Richard Smith ef87be3a62 Fix null pointer dereference if we redeclare an unprototyped function. Patch by
WenHan Gu!

llvm-svn: 184875
2013-06-25 20:34:17 +00:00
Ed Maste 3d3295daab Skip dsym tests also on FreeBSD
llvm-svn: 184874
2013-06-25 19:59:56 +00:00
Nico Weber 0f987a6fb3 Fix a comment.
llvm-svn: 184873
2013-06-25 19:25:12 +00:00
Arnold Schwaighofer a04b9ef1e8 X86 cost model: Vectorizing integer division is a bad idea
radar://14057959

llvm-svn: 184872
2013-06-25 19:14:09 +00:00
Ed Maste 09617a5d03 Skip tests that hang on FreeBSD
There's still significant work to do in the FreeBSD port, so no point
in a pr for these yet.

llvm-svn: 184871
2013-06-25 19:11:36 +00:00
Bob Wilson acfc01dedf Fix SROA to avoid unnecessary scalar conversions for 1-element vectors.
When a 1-element vector alloca is promoted, a store instruction can often be
rewritten without converting the value to a scalar and using an insertelement
instruction to stuff it into the new alloca.  This patch just adds a check
to skip that conversion when it is unnecessary.  This turns out to be really
important for some ARM Neon operations where <1 x i64> is used to get around
the fact that i64 is not a legal type.

llvm-svn: 184870
2013-06-25 19:09:50 +00:00
Edwin Vane 51a55d9964 cpp11-migrate: Really fixing doxygen warning
Last attempt at this fix was bogus.

llvm-svn: 184869
2013-06-25 19:01:18 +00:00
Ed Maste 8b006c69c0 Correct use of __FreeBSD_kernel__
It is defined on recent FreeBSD versions, so must not be mutually
exclusive with an #elif FreeBSD block.

Patch submitted by Robert Millan.

Fixes PR#16447.

llvm-svn: 184867
2013-06-25 18:58:11 +00:00
Manman Ren aed30fa3de Remove unused code. No functionality change.
llvm-svn: 184866
2013-06-25 18:49:55 +00:00
Richard Smith e83b1d3e7a More of N3652: don't add an implicit 'const' to 'constexpr' member functions when checking for overloads in C++1y.
llvm-svn: 184865
2013-06-25 18:46:26 +00:00
Bill Wendling c43250338a The GCDA 402 format won't have a second checksum either.
llvm-svn: 184864
2013-06-25 18:13:52 +00:00
Fariborz Jahanian f030d16c92 Objective-C: Warn when IBOutletCollection property
is declared to have 'assign' attribute.
// rdar://14212998

llvm-svn: 184863
2013-06-25 17:34:50 +00:00
Eli Bendersky 099888eccd Remove misplaced comment
llvm-svn: 184862
2013-06-25 17:07:56 +00:00
Nick Lewycky 39dc9f8be4 In tooling, reenable freeing of datastructures in codegen, just as we do for
the frontend. We don't want to respect the -disable-free flag here.

llvm-svn: 184861
2013-06-25 17:01:21 +00:00
Ulrich Weigand 93372b4583 [PowerPC] Support @got modifier
Add VK_... values and relocation types necessary to support
the @got family of modifiers.  Used by the asm parser only.

llvm-svn: 184860
2013-06-25 16:49:50 +00:00
Howard Hinnant 866d4efa7f Implement full support for non-pointer pointers in custom allocators for list.
llvm-svn: 184859
2013-06-25 16:08:47 +00:00
Dmitry Vyukov eb95448245 tsan: add missing __attribute__((visibility("default"))) to interface functions
llvm-svn: 184858
2013-06-25 15:36:25 +00:00
Rafael Espindola 355670dbc6 Use simpler version of llvm::sys::fs::exists.
llvm-svn: 184857
2013-06-25 15:14:22 +00:00
Rafael Espindola 00eaafd953 Don't use PathV1.h in Tools.cpp.
llvm-svn: 184856
2013-06-25 15:03:59 +00:00
Rafael Espindola 54bbaad459 Use the simpler version of llvm::sys::fs::exists.
llvm-svn: 184855
2013-06-25 14:48:00 +00:00
Ed Maste a708a36cea Match printf format specifiers and arguments
llvm-svn: 184854
2013-06-25 14:47:45 +00:00
Rafael Espindola 242fcb846e Move GetEXESuffix to the one place it is used.
llvm-svn: 184853
2013-06-25 14:42:30 +00:00
Rafael Espindola db7c03f05e Remove sys::PathSeparator.
llvm-svn: 184852
2013-06-25 14:32:45 +00:00
Rafael Espindola 04b3fc4981 Use the new llvm::sys::EnvPathSeparator.
llvm-svn: 184851
2013-06-25 14:29:51 +00:00
Ed Maste d66d3ec036 Update comment after Linux->POSIX rename
llvm-svn: 184850
2013-06-25 14:29:15 +00:00
Sergey Matveev c3332bc8c3 [lsan] Define interceptors more correctly. Also, always clear allocated memory.
llvm-svn: 184849
2013-06-25 14:05:52 +00:00
Aaron Watry 0a794a4612 R600: Consolidate expansion of v2i32/v4i32 ops for EG/SI
By default, we expand these operations for both EG and SI. Move the
duplicated code into a common space for now. If the targets ever actually
implement these operations as instructions, we can override that in the relevant
target.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 184848
2013-06-25 13:55:57 +00:00
Aaron Watry 0517275a57 R600: Add v2i32 test for vselect
Note: Only adding test for evergreen, not SI yet.

When I attempted to expand vselect for SI, I got the following:
llc: /home/awatry/src/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:522:
llvm::SDValue llvm::DAGTypeLegalizer::PromoteIntRes_SETCC(llvm::SDNode*):
Assertion `SVT.isVector() == N->getOperand(0).getValueType().isVector() &&
"Vector compare must return a vector result!"' failed.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 184847
2013-06-25 13:55:54 +00:00
Aaron Watry daabb20e1b R600/SI: Expand xor v2i32/v4i32
Add test cases for both vector sizes on SI and also add v2i32 test for EG.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 184846
2013-06-25 13:55:52 +00:00