Daniel Malea [Thu, 11 Jul 2013 22:28:17 +0000 (22:28 +0000)]
Enable Mac OS X tests disabled due to llvm.org/pr16567
- thread count remains correct now that we use pthread_kill() instead of kill() to deliver signals
llvm-svn: 186126
Eli Friedman [Thu, 11 Jul 2013 22:22:22 +0000 (22:22 +0000)]
Make CXXBaseSpecifier::getType return unqual type.
Various pieces of code, like base initialization in Sema and RTTI IRGen,
don't properly ignore qualifiers on base classes. Instead of auditing the
whole codebase, just strip them off in the getter. (The type as written is
still available in the TypeSourceInfo for code that cares.)
Fixes PR16596.
llvm-svn: 186125
Daniel Malea [Thu, 11 Jul 2013 22:14:47 +0000 (22:14 +0000)]
Improve TestConcurrentEvents.py
- code cleanup, improved reporting when failures take place
- ensure known thread is interrupted by using pthread_kill() instead of kill() in the signal worker thread
- above should avoid llvm.org/pr16567 on Mac OS X (though kill() could still cause threads to pop out of existance temporarily)
- added an additional check that all threads have exited after worker threads are all join()ed
- logged llvm.org/pr16603 for the new Linux bug discovered
llvm-svn: 186124
Benjamin Kramer [Thu, 11 Jul 2013 21:59:16 +0000 (21:59 +0000)]
Sync SmallBitVector with BitVector. Add unit tests for the missing methods.
llvm-svn: 186123
Enrico Granata [Thu, 11 Jul 2013 21:49:38 +0000 (21:49 +0000)]
Tweaks to the Python reference and example command to use the preferred print style and the (finally available :-) SetError API
llvm-svn: 186122
Michael Gottesman [Thu, 11 Jul 2013 21:38:33 +0000 (21:38 +0000)]
Fixed up comments in TargetLowering.h to conform to the LLVM Style Guide.
llvm-svn: 186121
Daniel Jasper [Thu, 11 Jul 2013 21:27:40 +0000 (21:27 +0000)]
clang-format: Fix bug concerning the alignment of "}".
Before:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
} // This is the indent clang-format would prefer.
After:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
}
llvm-svn: 186120
Adrian Prantl [Thu, 11 Jul 2013 21:16:14 +0000 (21:16 +0000)]
In response to dblaikie's comment on r186035, replacing the
(reduced LLVM IR) + (full source in comment)
with the
(full LLVM IR) + (reduced src in comment)
llvm-svn: 186119
Rafael Espindola [Thu, 11 Jul 2013 21:11:55 +0000 (21:11 +0000)]
Add tests for the before and after modifiers.
llvm-svn: 186118
Daniel Jasper [Thu, 11 Jul 2013 21:02:56 +0000 (21:02 +0000)]
clang-format: Break before trailing annotations.
(if they are not function-like).
Before:
SomeFunction(
aaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaa)
OVERRIDE;
After:
SomeFunction(
aaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE;
llvm-svn: 186117
Nadav Rotem [Thu, 11 Jul 2013 20:56:13 +0000 (20:56 +0000)]
Remove an argument that we dont use anymore.
llvm-svn: 186116
Daniel Jasper [Thu, 11 Jul 2013 20:41:21 +0000 (20:41 +0000)]
clang-format: Avoid line breaks before the first <<.
This puts a slight penalty on the linebreak before the first "<<", so
that clang-format generally tries to keep things on the first line.
User feedback has shown that this is generally desirable.
Before:
llvm::outs()
<< "
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" <<
aaaaaaaaaaaaaaaaaaaaaaaaaaa;
After:
llvm::outs() << "
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ="
<<
aaaaaaaaaaaaaaaaaaaaaaaaaaa;
llvm-svn: 186115
Ashok Thirumurthi [Thu, 11 Jul 2013 20:39:00 +0000 (20:39 +0000)]
Adds methods to ObjectFileELF to access data in ELF segments
in preparation to add support for ELF core files.
Patch by Samuel Jacob!
llvm-svn: 186114
Rafael Espindola [Thu, 11 Jul 2013 20:01:30 +0000 (20:01 +0000)]
Use %llu to print a 64 bit number. Should fix the ARM bots.
llvm-svn: 186113
Matt Kopec [Thu, 11 Jul 2013 20:01:22 +0000 (20:01 +0000)]
Fix unhandled SIGTRAP signal on Linux causing assertion.
llvm-svn: 186112
Fariborz Jahanian [Thu, 11 Jul 2013 19:13:34 +0000 (19:13 +0000)]
Restore warning to its original text when
certain familiy of methods have the wrong type.
// rdar://
14408244
llvm-svn: 186111
Rafael Espindola [Thu, 11 Jul 2013 19:09:04 +0000 (19:09 +0000)]
Add a test for llvm-ar's m operation.
llvm-svn: 186110
Chandler Carruth [Thu, 11 Jul 2013 18:51:40 +0000 (18:51 +0000)]
Fix a veritable conucopia of bugs in the readdir_r interceptors.
First, the reason I came here: I forgot to look at readdir64_r which had
the exact same bug as readdir_r. However, upon applying the same
quick-fix and testing it I discovered that it still didn't work at all.
As a consequence, I spent some time studying the code and thinking about
it and fixed several other problems.
Second, the code was checking for a null entry and result pointer, but
there is no indication that null pointers are viable here. Certainly,
the spec makes it extremely clear that there is no non-error case where
the implementation of readdir_r fails to dereference the 'result'
pointer and store NULL to it. Thus, our checking for a non-null 'result'
pointer before reflecting that write in the instrumentation was
trivially dead. Remove it.
Third, the interceptor was marking the write to the actual dirent struct
by looking at the entry pointer, but nothing in the spec requires that
the dirent struct written is actually written into the entry structure
provided. A threadlocal buffer would be just as conforming, and the spec
goes out of its way to say the pointer to the *actual* result dirent
struct is stored into *result, so *that* is where the interceptor should
reflect a write occuring. This also obviates the need to even consider
whether the 'entry' parameter is null.
Fourth, I got to the bottom of why nothing at all worked in readdir64_r
-- the interceptor structure for dirent64 was completely wrong in that
it was the same as dirent. I fixed this struct to be correct (64-bit
inode and 64-bit offset! just a 64-bit offset isn't enough!) and added
several missing tests for the size and layout of this struct.
llvm-svn: 186109
Hal Finkel [Thu, 11 Jul 2013 17:43:32 +0000 (17:43 +0000)]
PPC: Add some missing V_SET0 patterns
We had patterns to match v4i32 immAllZerosV -> V_SET0, but not patterns for
v8i16 (which occurs in the test case) or v16i8. The same was true for
V_SETALLONES (so I added the associated patterns for those as well).
Another bug found by llvm-stress.
llvm-svn: 186108
Andrew Trick [Thu, 11 Jul 2013 17:08:59 +0000 (17:08 +0000)]
indvars: Improve LFTR by eliminating truncation when comparing against a constant.
Patch by Michele Scandale!
Adds a special handling of the case where, during the loop exit
condition rewriting, the exit value is a constant of bitwidth lower
than the type of the induction variable: instead of introducing a
trunc operation in order to match correctly the operand types, it
allows to convert the constant value to an equivalent constant,
depending on the initial value of the induction variable and the trip
count, in order have an equivalent comparison between the induction
variable and the new constant.
llvm-svn: 186107
Eli Bendersky [Thu, 11 Jul 2013 16:53:04 +0000 (16:53 +0000)]
Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.
llvm-svn: 186106
Fariborz Jahanian [Thu, 11 Jul 2013 16:48:06 +0000 (16:48 +0000)]
ObjectiveC arc[qoi]: When due to change of certain methods'
result type, a diagnostic being issued, issue a 'note'
mentioning reason behind the unexpected warning.
// rdar://
14121570.
llvm-svn: 186105
Michael Sartain [Thu, 11 Jul 2013 16:40:56 +0000 (16:40 +0000)]
Fix "source list -n printf" on Linux (printf is symbol alias for __printf)
Differential Revision: http://llvm-reviews.chandlerc.com/D1109
llvm-svn: 186104
Sergey Matveev [Thu, 11 Jul 2013 16:37:44 +0000 (16:37 +0000)]
[sanitizer] Remove optional arguments from clone() invocation.
Unbreaks compilation on older systems. Patch by Andy Jost.
llvm-svn: 186103
Hal Finkel [Thu, 11 Jul 2013 16:31:51 +0000 (16:31 +0000)]
PPCDAGToDAGISel::isRunOfOnes should return false on zero
This fixes a bug (found by csmith) at -O0 where we attempt to create a RLWIMI
with an out-of-range operand. Most uses of the isRunOfOnes function are guarded
by a condition that the value is not zero. This was not true in two places, and
in both places a zero input would result in an out-of-rage MB value (= 32).
To fix this, isRunOfOnes returns false on a zero input (and I've remove one
now-redundant guard).
llvm-svn: 186101
Craig Topper [Thu, 11 Jul 2013 16:22:38 +0000 (16:22 +0000)]
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186098
Rafael Espindola [Thu, 11 Jul 2013 16:11:21 +0000 (16:11 +0000)]
Add back code for supporting old mingw versions. Should bring the bots back.
llvm-svn: 186096
Benjamin Kramer [Thu, 11 Jul 2013 16:05:50 +0000 (16:05 +0000)]
Don't use a potentially expensive shift if all we want is one set bit.
No functionality change.
llvm-svn: 186095
Rafael Espindola [Thu, 11 Jul 2013 15:54:53 +0000 (15:54 +0000)]
InsertBefore is the same as AddBefore. Delete it.
llvm-svn: 186094
Edwin Vane [Thu, 11 Jul 2013 15:54:06 +0000 (15:54 +0000)]
cpp11-migrate: Add missing file headers in unit tests
Differential: http://llvm-reviews.chandlerc.com/D1124
Author: Guillaume Papin <guillaume.papin@epitech.eu>
llvm-svn: 186093
Rafael Espindola [Thu, 11 Jul 2013 15:47:04 +0000 (15:47 +0000)]
Looks like some versions of mingw don't have errno_t. Use int.
llvm-svn: 186092
Benjamin Kramer [Thu, 11 Jul 2013 15:37:27 +0000 (15:37 +0000)]
Use move semantics if possible to construct ConstantRanges.
Arithmetic on ConstantRanges creates a lot of large temporary APInts that
benefit from move semantics.
llvm-svn: 186091
Rafael Espindola [Thu, 11 Jul 2013 15:35:23 +0000 (15:35 +0000)]
Fix a FIXME about the format and add a test.
While at it, use strftime on Unix too and use the thread safe versions
of localtime.
llvm-svn: 186090
Howard Hinnant [Thu, 11 Jul 2013 15:32:55 +0000 (15:32 +0000)]
Bill Fisher: This patch fixes a less likely case where '\b' can back up into invalid memory, when driven by a regex_iterator (for case 1, see r185273 or llvm.org/bugs/show_bug.cgi?id=16240)
The attached test program also supplies a test for the case 1 fix in r185273.
llvm-svn: 186089
Arnold Schwaighofer [Thu, 11 Jul 2013 15:21:55 +0000 (15:21 +0000)]
LoopVectorize: Vectorize all accesses in address space zero with unit stride
We can vectorize them because in the case where we wrap in the address space the
unvectorized code would have had to access a pointer value of zero which is
undefined behavior in address space zero according to the LLVM IR semantics.
(Thank you Duncan, for pointing this out to me).
Fixes PR16592.
llvm-svn: 186088
Daniel Jasper [Thu, 11 Jul 2013 14:33:06 +0000 (14:33 +0000)]
Improve detection of trailing return types.
Trailing return types can only occur in declaration contexts.
Before:
void f() { auto a = b -> c(); }
After:
void f() { auto a = b->c(); }
llvm-svn: 186087
Ed Maste [Thu, 11 Jul 2013 14:12:16 +0000 (14:12 +0000)]
Add stub GetThreadName for FreeBSD, missed in r186033.
On FreeBSD inferior thread names are available through ptrace, so we won't
use Host::GetThreadName anyway.
llvm-svn: 186086
Daniel Jasper [Thu, 11 Jul 2013 13:48:16 +0000 (13:48 +0000)]
Fix indentation problem for comments in call chains
Before:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
After:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
llvm-svn: 186085
Rafael Espindola [Thu, 11 Jul 2013 13:44:10 +0000 (13:44 +0000)]
Merge these tests.
llvm-svn: 186084
Rafael Espindola [Thu, 11 Jul 2013 13:31:38 +0000 (13:31 +0000)]
Use a more unique name to avoid conflicting with directory.ll tests when running
in parallel.
llvm-svn: 186083
Rafael Espindola [Thu, 11 Jul 2013 13:24:27 +0000 (13:24 +0000)]
Add a test for llvm-ar's 'd' operation.
llvm-svn: 186082
Rafael Espindola [Thu, 11 Jul 2013 13:13:09 +0000 (13:13 +0000)]
Add tests for the 'x' operation.
llvm-svn: 186081
Rafael Espindola [Thu, 11 Jul 2013 13:03:27 +0000 (13:03 +0000)]
Remove the 'N' modifier from llvm-ar.
* It is not present on OS X.
* It is untested.
* It is not needed for using ar in a build system.
llvm-svn: 186080
Rafael Espindola [Thu, 11 Jul 2013 12:54:11 +0000 (12:54 +0000)]
Delete dead code.
llvm-svn: 186079
Rafael Espindola [Thu, 11 Jul 2013 12:38:02 +0000 (12:38 +0000)]
Remove support for truncating names in archives.
* All systems we support have some form of long name support.
* The options has different names and semantics in different implementations
('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on
build systems.
* It was completely untested.
llvm-svn: 186078
Daniel Jasper [Thu, 11 Jul 2013 12:34:23 +0000 (12:34 +0000)]
Keep trailing annotations close to their argument.
Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
aaaaaaaaaaaa);
After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
GUARDED_BY(
aaaaaaaaaaaa);
llvm-svn: 186077
Rafael Espindola [Thu, 11 Jul 2013 12:28:36 +0000 (12:28 +0000)]
Sync llvm-ar's help string with the options it supports.
llvm-svn: 186076
Benjamin Kramer [Thu, 11 Jul 2013 12:13:16 +0000 (12:13 +0000)]
Reduce the number of indirections in the attributes implementation.
- Coallocate entires for AttributeSetImpls and Nodes after the class itself.
- Remove mutable iterators from immutable classes.
- Remove unused context field from AttributeImpl.
- Derive Enum/Align/String attribute implementations from AttributeImpl instead
of having a whole new inheritance tree for them.
- Derive AlignAttributeImpl from EnumAttributeImpl.
llvm-svn: 186075
Richard Sandiford [Thu, 11 Jul 2013 09:10:38 +0000 (09:10 +0000)]
[SystemZ] Add testcase missing from r186073
llvm-svn: 186074
Richard Sandiford [Thu, 11 Jul 2013 09:10:09 +0000 (09:10 +0000)]
[SystemZ] Use zeroing form of RISBG for shift-and-AND sequences
Extend r186072 to handle shifts and ANDs.
llvm-svn: 186073
Richard Sandiford [Thu, 11 Jul 2013 08:59:12 +0000 (08:59 +0000)]
[SystemZ] Use zeroing form of RISBG for some AND sequences
RISBG can handle some ANDs for which no AND IMMEDIATE exists.
It also acts as a three-operand AND for some cases where an
AND IMMEDIATE could be used instead.
It might be worth adding a pass to replace RISBG with AND IMMEDIATE
in cases where the register operands end up being the same and where
AND IMMEDIATE is smaller.
llvm-svn: 186072
Rui Ueyama [Thu, 11 Jul 2013 08:46:21 +0000 (08:46 +0000)]
[PECOFF] Support linking against DLL.
This patch adds a new pass, IdataPass, to transform shared atom references
to real references and to construct the .idata section data. With this patch
lld can produce a working Hello World program by linking it against
kernel32.dll and user32.dll.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1096
llvm-svn: 186071
Richard Sandiford [Thu, 11 Jul 2013 08:37:13 +0000 (08:37 +0000)]
[SystemZ] Allow 8-bit operands to RISBG
RISBG has three 8-bit operands (I3, I4 and I5). I'd originally
restricted all three to 6 bits, since that's the only range we intended
to use at the time. However, the top bit of I4 acts as a "zero" flag for
RISBG, while the top bit of I3 acts as a "test" flag for RNSBG & co.
This patch therefore allows them to have the full 8-bit range.
I've left the fifth operand as a 6-bit value for now since the
upper 2 bits have no defined meaning.
llvm-svn: 186070
Duncan Sands [Thu, 11 Jul 2013 08:28:20 +0000 (08:28 +0000)]
TryToSimplifyUncondBranchFromEmptyBlock was checking that any common
predecessors of the two blocks it is attempting to merge supply the
same incoming values to any phi in the successor block. This change
allows merging in the case where there is one or more incoming values
that are undef. The undef values are rewritten to match the non-undef
value that flows from the other edge. Patch by Mark Lacey.
llvm-svn: 186069
Hal Finkel [Thu, 11 Jul 2013 06:41:14 +0000 (06:41 +0000)]
Initialize AsmPrinter::MF in the constructor
MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file
contains only globals (no functions), then we need this to be initialized
because, when encountering an error, lowerConstant() references it.
This should fix the non-deterministic failures of
test/CodeGen/X86/nonconst-static-iv.ll, etc.
llvm-svn: 186068
Hal Finkel [Thu, 11 Jul 2013 05:55:57 +0000 (05:55 +0000)]
RegScavenger should not exclude undef uses
When computing currently-live registers, the register scavenger excludes undef
uses. As a result, undef uses are ignored when computing the restore points of
registers spilled into the emergency slots. While the register scavenger
normally excludes from consideration, when scavenging, registers used by the
current instruction, we need to not exclude undef uses. Otherwise, we might end
up requiring more emergency spill slots than we have (in the case where the
undef use *is* the currently-spilled register).
Another bug found by llvm-stress.
llvm-svn: 186067
Rui Ueyama [Thu, 11 Jul 2013 05:43:38 +0000 (05:43 +0000)]
[PECOFF][Writer] Fixed a bug that an empty section is emit to the section header.
llvm-svn: 186066
Craig Topper [Thu, 11 Jul 2013 05:39:44 +0000 (05:39 +0000)]
Fix indentation. No functional change.
llvm-svn: 186065
Nadav Rotem [Thu, 11 Jul 2013 05:39:02 +0000 (05:39 +0000)]
Fix a warning.
llvm-svn: 186064
Nadav Rotem [Thu, 11 Jul 2013 05:15:11 +0000 (05:15 +0000)]
Consolidate more lit tests.
llvm-svn: 186063
Nadav Rotem [Thu, 11 Jul 2013 05:11:33 +0000 (05:11 +0000)]
Consolidate some of the lit tests.
llvm-svn: 186062
Richard Smith [Thu, 11 Jul 2013 05:10:21 +0000 (05:10 +0000)]
PR5066: If a declarator cannot have an identifier, and cannot possibly be
followed by an identifier, then diagnose an identifier as being a bogus part of
the declarator instead of tripping over it. Improves diagnostics for cases like
std::vector<const int *p> my_vec;
llvm-svn: 186061
Nadav Rotem [Thu, 11 Jul 2013 05:01:50 +0000 (05:01 +0000)]
Consolidate some of the lit tests.
llvm-svn: 186060
James Dennett [Thu, 11 Jul 2013 05:01:16 +0000 (05:01 +0000)]
Documentation fixes - the rest of DeclCXX.h:
* More \brief additions/fixes;
* Fix some misleading comments about C++11's explicit conversion operators;
* Mark up some \code examples;
* Add \file documentation.
llvm-svn: 186059
Nadav Rotem [Thu, 11 Jul 2013 04:54:05 +0000 (04:54 +0000)]
SLPVectorizer: refactor the code that places extracts. Place the code that decides where to put extracts in the build-tree phase. This allows us to take the cost of the extracts into account.
llvm-svn: 186058
Michael Gottesman [Thu, 11 Jul 2013 04:40:01 +0000 (04:40 +0000)]
Teach TailRecursionElimination to handle certain cases of nocapture escaping allocas.
Without the changes introduced into this patch, if TRE saw any allocas at all,
TRE would not perform TRE *or* mark callsites with the tail marker.
Because TRE runs after mem2reg, this inadequacy is not a death sentence. But
given a callsite A without escaping alloca argument, A may not be able to have
the tail marker placed on it due to a separate callsite B having a write-back
parameter passed in via an argument with the nocapture attribute.
Assume that B is the only other callsite besides A and B only has nocapture
escaping alloca arguments (*NOTE* B may have other arguments that are not passed
allocas). In this case not marking A with the tail marker is unnecessarily
conservative since:
1. By assumption A has no escaping alloca arguments itself so it can not
access the caller's stack via its arguments.
2. Since all of B's escaping alloca arguments are passed as parameters with
the nocapture attribute, we know that B does not stash said escaping
allocas in a manner that outlives B itself and thus could be accessed
indirectly by A.
With the changes introduced by this patch:
1. If we see any escaping allocas passed as a capturing argument, we do
nothing and bail early.
2. If we do not see any escaping allocas passed as captured arguments but we
do see escaping allocas passed as nocapture arguments:
i. We do not perform TRE to avoid PR962 since the code generator produces
significantly worse code for the dynamic allocas that would be created
by the TRE algorithm.
ii. If we do not return twice, mark call sites without escaping allocas
with the tail marker. *NOTE* This excludes functions with escaping
nocapture allocas.
3. If we do not see any escaping allocas at all (whether captured or not):
i. If we do not have usage of setjmp, mark all callsites with the tail
marker.
ii. If there are no dynamic/variable sized allocas in the function,
attempt to perform TRE on all callsites in the function.
Based off of a patch by Nick Lewycky.
rdar://
14324281.
llvm-svn: 186057
James Dennett [Thu, 11 Jul 2013 03:51:36 +0000 (03:51 +0000)]
Documentation cleanup for DeclCXX.h:
* Fixing up \brief summaries (adding some, making some briefer);
* Standardizing on \commands, not @commands;
* Update C++0x references to C++11;
* Fix typos and Doxygen warnings.
llvm-svn: 186056
NAKAMURA Takumi [Thu, 11 Jul 2013 03:45:54 +0000 (03:45 +0000)]
clang/test/CodeGen/c11atomics.c: Fix testcase for -Asserts since r186054.
llvm-svn: 186055
Eli Friedman [Thu, 11 Jul 2013 02:28:36 +0000 (02:28 +0000)]
Fix build.
Sorry about that.
llvm-svn: 186054
Richard Smith [Thu, 11 Jul 2013 02:27:57 +0000 (02:27 +0000)]
Add a __builtin_addressof that performs the same functionality as the built-in
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.
llvm-svn: 186053
Richard Smith [Thu, 11 Jul 2013 02:26:56 +0000 (02:26 +0000)]
Make CheckAddressOfOperand a member of Sema so it can be reused by
__builtin_addressof.
llvm-svn: 186052
Hal Finkel [Thu, 11 Jul 2013 01:55:55 +0000 (01:55 +0000)]
Move r186044 tests into CodeGen/X86
I had thought that these tests could be target-neutral, but in practice this is
not the case (on some targets, like Hexagon and Darwin), they trigger an assert
(a different assert than the one that r186044 fixes).
llvm-svn: 186051
Jim Ingham [Thu, 11 Jul 2013 01:47:46 +0000 (01:47 +0000)]
Add a -remote-file option to “target create” to specify the location of the executable on a remote system (if debugging remotely using debugserver on the target system.) This gets us closer to being able to set up a remote debugging session from the lldb command line.
llvm-svn: 186050
Eli Friedman [Thu, 11 Jul 2013 01:32:21 +0000 (01:32 +0000)]
Simplify atomic load/store IRGen.
Also fixes a couple minor bugs along the way; see testcases.
llvm-svn: 186049
Richard Smith [Thu, 11 Jul 2013 00:34:42 +0000 (00:34 +0000)]
Fix some grammar errors.
llvm-svn: 186048
Richard Smith [Thu, 11 Jul 2013 00:27:05 +0000 (00:27 +0000)]
Fix documentation:
#if defined(__has_foo("X")) && __has_foo("X")
is not a correct way to portably use __has_foo, because it is expanded to
#if 0 && 0("X")
... which is ill-formed.
Also add a missing ')'.
llvm-svn: 186047
Hal Finkel [Wed, 10 Jul 2013 23:25:03 +0000 (23:25 +0000)]
Set REQUIRES shell on the test cases for r186044
Trying to fix the i686-mingw32 build.
llvm-svn: 186046
Hal Finkel [Wed, 10 Jul 2013 23:11:14 +0000 (23:11 +0000)]
XFAIL the test cases for r186044 on Hexagon
For some reason, the Hexagon backend does not reject these invalid static
initializer expressions, but instead crashes in AsmPrinter::EmitGlobalConstant.
llvm-svn: 186045
Hal Finkel [Wed, 10 Jul 2013 22:51:01 +0000 (22:51 +0000)]
Don't assert if we can't constant fold extract/insertvalue
A non-constant-foldable static initializer expression containing insertvalue or
extractvalue had been causing an assert:
Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be
folded!"' failed.
Now we report a more-sensible "Unsupported expression in static initializer"
error instead.
Fixes PR15417.
llvm-svn: 186044
Rafael Espindola [Wed, 10 Jul 2013 22:15:29 +0000 (22:15 +0000)]
Remove this test for now.
It is not reliable to depend on the output of llvm_unreachable. The original
change will have proper tests when llvm-ar moves to lib/Object (soon).
llvm-svn: 186043
Hans Wennborg [Wed, 10 Jul 2013 22:09:22 +0000 (22:09 +0000)]
CommandLine.rst: remove tiny bit of bad mark-up
llvm-svn: 186042
Rafael Espindola [Wed, 10 Jul 2013 22:07:59 +0000 (22:07 +0000)]
Find the symbol table on archives created on OS X.
llvm-svn: 186041
Richard Smith [Wed, 10 Jul 2013 22:04:13 +0000 (22:04 +0000)]
If we friend a declaration twice, that should not make it visible to name
lookup in the surrounding context. Slightly rework how we handle friend
declarations to inherit the visibility of the prior declaration, rather
than setting a friend declaration to be visible whenever there was a prior
declaration.
llvm-svn: 186040
Andrew Kaylor [Wed, 10 Jul 2013 21:57:27 +0000 (21:57 +0000)]
Stop process monitor from ProcessPOSIX::Finalize
llvm-svn: 186039
Rafael Espindola [Wed, 10 Jul 2013 21:47:16 +0000 (21:47 +0000)]
Move tests from test/Archive to test/Object.
There is no lib/Archive anymore and some archive tests were in test/Archive and
others in test/Object. Since archive is just one of the formats supported by
lib/Object, test/Object is probably the best location.
llvm-svn: 186038
Fariborz Jahanian [Wed, 10 Jul 2013 21:30:22 +0000 (21:30 +0000)]
ObjC migrator: Improve on hueristics.
migrate to 'copy attribute if Object
class implements NSCopying otherwise
assume implied 'strong'. Remove
lifetime qualifier on property as it has
moved to property's attribute. Added TODO
comment for future work by poking into
setter implementation.
llvm-svn: 186037
Adrian Prantl [Wed, 10 Jul 2013 21:08:02 +0000 (21:08 +0000)]
Add a comment.
llvm-svn: 186035
Tim Northover [Wed, 10 Jul 2013 20:58:17 +0000 (20:58 +0000)]
Put ELF COMDAT relocations into the relevant COMDAT group.
Patch from Игорь Пашев (I do hope we support utf-8 commit messages; I
also hope he'll forgive me for transliterating it as Igor Pashev in
case things go horribly wrong).
llvm-svn: 186034
Matt Kopec [Wed, 10 Jul 2013 20:53:11 +0000 (20:53 +0000)]
Add support for listing inferior thread names on Linux.
llvm-svn: 186033
Stephen Lin [Wed, 10 Jul 2013 20:47:39 +0000 (20:47 +0000)]
Remove trailing whitespac
llvm-svn: 186032
Adrian Prantl [Wed, 10 Jul 2013 20:43:29 +0000 (20:43 +0000)]
Add a testcase for r186014.
llvm-svn: 186031
Eric Christopher [Wed, 10 Jul 2013 20:14:36 +0000 (20:14 +0000)]
Use a LexicalScope here since it is one and it will encapsulate
the two sets of debug scope and cleanup scope.
llvm-svn: 186030
Rafael Espindola [Wed, 10 Jul 2013 20:14:22 +0000 (20:14 +0000)]
Don't crash in 'llvm -s' when an archive has no symtab.
llvm-svn: 186029
Jordan Rose [Wed, 10 Jul 2013 19:14:10 +0000 (19:14 +0000)]
[analyzer] Remove bogus assert: in C++11, 'new' can do list-initialization.
Previously, we asserted that whenever 'new' did not include a constructor
call, the type must be a non-record type. In C++11, however, uniform
initialization syntax (braces) allow 'new' to construct records with
list-initialization: "new Point{1, 2}".
Removing this assertion should be perfectly safe; the code here matches
what VisitDeclStmt does for regions allocated on the stack.
<rdar://problem/
14403437>
llvm-svn: 186028
Reid Kleckner [Wed, 10 Jul 2013 18:55:06 +0000 (18:55 +0000)]
Fix %t typo in Ocaml bindings test.
llvm-svn: 186027
Michael Gottesman [Wed, 10 Jul 2013 18:49:00 +0000 (18:49 +0000)]
[objc-arc] Changed 'mode: c++' => 'C++' at Nick Lewycky's suggestion. Also removed unnecessary mode: c++ lines from .cpp files.
llvm-svn: 186026
Michael Gottesman [Wed, 10 Jul 2013 18:40:49 +0000 (18:40 +0000)]
Changed "mode: c++" => "C++" at the suggestion of Nick Lewycky.
llvm-svn: 186025
James Dennett [Wed, 10 Jul 2013 18:29:15 +0000 (18:29 +0000)]
Add a hook RecursiveASTVisitor::TraverseLambdaBody, to enable visitors to
use/maintain additional state from the LambdaExpr while visiting the body
of a LambdaExpr.
One use for this arises because Clang's AST currently holds lambda bodies
in a form prior to their adjustment to refer to captured copies of local
variables, and so some clients will need access to the lambda's closure
type in order to query how to map VarDecl*s to the FieldDecls of their
by-copy captures. This hook is sufficient for at least one such client;
to do this without such a hook would require the client to re-implement
the whole of TraverseLambdaExpr, which is non-trivial and would likely be
more brittle.
llvm-svn: 186024
Enrico Granata [Wed, 10 Jul 2013 18:25:45 +0000 (18:25 +0000)]
Adding a summary for ObjC blocks
llvm-svn: 186023
Marshall Clow [Wed, 10 Jul 2013 18:01:34 +0000 (18:01 +0000)]
Improved tests (and fixed a bug in the tests); thanks to Richard Smith for the suggestion
llvm-svn: 186022