Commit Graph

117180 Commits

Author SHA1 Message Date
Richard Smith cf74da76db Fix PR11385: A pointer constant expression which has been cast via an integer is
not safely derived. Don't allow lvalue-to-rvalue conversions on the result of
dereferencing such a pointer.

llvm-svn: 144783
2011-11-16 07:18:12 +00:00
Bob Wilson 643e63c40c Update the SP in the SjLj jmpbuf whenever it changes. <rdar://problem/10444602>
This same basic code was in the older version of the SjLj exception handling,
but it was removed in the recent revisions to that code.  It needs to be there.

llvm-svn: 144782
2011-11-16 07:12:00 +00:00
Bob Wilson f6d1728d8f Fix ARM SjLj-EH dispatch setup code. <rdar://problem/10444602>
The EmitBasePointerRecalculation function has 2 problems, one minor and one
fatal.  The minor problem is that it inserts the code at the setjmp
instead of in the dispatch block.  The fatal problem is that at the point
where this code runs, we don't know whether there will be a base pointer,
so the entire function is a no-op.  The base pointer recalculation needs to
be handled as it was before, by inserting a pseudo instruction that gets
expanded late.

Most of the support for the old approach is still here, but it no longer
has any connection to the eh_sjlj_dispatchsetup intrinsic.  Clean up the
parts related to the intrinsic and just generate the pseudo instruction
directly.

llvm-svn: 144781
2011-11-16 07:11:57 +00:00
Greg Clayton e4e45924d7 Made the darwin host layer properly reap any child processes that it spawns.
After recent changes we weren't reaping child processes resulting in many
zombie processes. 

This was fixed by adding more settings to the ProcessLaunchOptions class
that allow clients to specify a callback function and baton to be notified
when their process dies. If one is not supplied a default callback will be
used that "does the right thing". 

Cleaned up a race condition in the ProcessGDBRemote class that would attempt
to monitor when debugserver died. 

Added an extra boolean to the process monitor callbacks that indicate if a
process exited or not. If your process exited with a zero exit status and no
signal, both items could be zero.

Modified the process monitor functions to not require a callback function
in order to reap the child process.

llvm-svn: 144780
2011-11-16 05:37:56 +00:00
Douglas Gregor 84febf4a4d Migrate a few more modules tests over to -emit-module-from-map.
llvm-svn: 144779
2011-11-16 05:16:30 +00:00
Ted Kremenek 0e9843b328 Teach ccc-analyzer about -fobjc-arc.
llvm-svn: 144778
2011-11-16 05:14:42 +00:00
Craig Topper 07d8b5e2c9 Remove code to enable execution dependency fix pass on VR256. VR128 is sufficient after r144636.
llvm-svn: 144777
2011-11-16 05:02:04 +00:00
Evan Cheng 4ac36c8e26 Revert r144568 now that r144730 has fixed the fast-isel kill marker bug.
llvm-svn: 144776
2011-11-16 04:55:01 +00:00
Nick Lewycky db408f1857 Fix typo in test.
llvm-svn: 144774
2011-11-16 03:56:38 +00:00
Nick Lewycky c7f1e7993c Merge isObjectPointerWithTrustworthySize with getPointerSize. Use it when
looking at the size of the pointee. Fixes PR11390!

llvm-svn: 144773
2011-11-16 03:49:48 +00:00
Evan Cheng b8c55a5339 If the 2addr instruction has other kills, don't move it below any other uses since we don't want to extend other live ranges.
llvm-svn: 144772
2011-11-16 03:47:42 +00:00
Evan Cheng 59f8156ea0 RescheduleKillAboveMI() must backtrack to before the rescheduled DBG_VALUE instructions. rdar://10451185
llvm-svn: 144771
2011-11-16 03:33:08 +00:00
Evan Cheng 9ddd69a8bc Process all uses first before defs to accurately capture register liveness. rdar://10449480
llvm-svn: 144770
2011-11-16 03:05:12 +00:00
Eli Friedman e6270395e3 Fix testcase.
llvm-svn: 144769
2011-11-16 03:03:52 +00:00
Eli Friedman 87f92512c3 CONCAT_VECTORS can have more than two operands. PR11389.
llvm-svn: 144768
2011-11-16 02:52:39 +00:00
Eli Friedman d257a464d1 Add a couple asserts so it will be easier to debug if we accidentally pass indexed loads/stores to the legalizer.
llvm-svn: 144767
2011-11-16 02:43:15 +00:00
Argyrios Kyrtzidis 516eec2d8b [libclang] Fix crash on invalid code. Fixes rdar://10451854
llvm-svn: 144766
2011-11-16 02:35:10 +00:00
Argyrios Kyrtzidis df15c20979 [libclang] Indexing API: fill the objc category info for a category implementation and
do not crash if no client container is registered for a declaration context.

llvm-svn: 144765
2011-11-16 02:35:05 +00:00
Argyrios Kyrtzidis d7b8790003 [libclang] Indexing API: make sure we do not try to index local declarations.
llvm-svn: 144764
2011-11-16 02:35:01 +00:00
Argyrios Kyrtzidis e4acd23f0b [libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only report one reference
per file.

llvm-svn: 144763
2011-11-16 02:34:59 +00:00
Argyrios Kyrtzidis f03e734876 [libclang] In lazyCreateDiags, recreate the diagnostic set if the number of diagnostics
in the ASTUnit changed.

llvm-svn: 144762
2011-11-16 02:34:55 +00:00
Eli Friedman aa9512c484 Fix test on Release builds.
llvm-svn: 144761
2011-11-16 02:19:03 +00:00
Sean Callanan 6d6acc89ad Fixed a problem where the target didn't use a
NULL-terminated C string to store the contents
of the expression prefix file.  This meant that
expressions, when printing the contents of the
prefix into the expression's text, would
invariably put in bad data after the end of the
expression.

Now, instead, we store the prefix contents in a
std::string, which handles null-termination
correctly.

llvm-svn: 144760
2011-11-16 01:54:57 +00:00
Michael J. Spencer 415e8aa84a Remove extra ,.
llvm-svn: 144759
2011-11-16 01:36:50 +00:00
Kostya Serebryany 6e6b03ec46 AddressSanitizer, first commit (compiler module only)
llvm-svn: 144758
2011-11-16 01:35:23 +00:00
Michael J. Spencer ca48ae0194 Object/Archive: Give Child a operator < for map.
llvm-svn: 144757
2011-11-16 01:25:13 +00:00
Michael J. Spencer ecdd31181d Support/COFF: Add structs and enums from the standard for image files.
llvm-svn: 144756
2011-11-16 01:24:57 +00:00
Michael J. Spencer 53723de5b8 llvm-objdump: Ignore non-objects in archives.
llvm-svn: 144755
2011-11-16 01:24:41 +00:00
Daniel Dunbar b151274d3d lib: Remove uses of complex.h which does not appear to be required.
llvm-svn: 144754
2011-11-16 01:19:32 +00:00
Daniel Dunbar 490a270f18 lib/gcc_personality_v0: Remove an unnecessary include.
llvm-svn: 144753
2011-11-16 01:19:29 +00:00
Daniel Dunbar 5ed39314ce lib: Eliminate direct include of stdlib.h from files that used to (potentially)
need it for compilerrt_abort().

llvm-svn: 144752
2011-11-16 01:19:26 +00:00
Daniel Dunbar 2b88e03404 lib: Add support for library wide utility functions, and make compilerrt_abort()
a real boy.
 - The utility module needs to be included into every produced library, because
   we don't have enough dependency tracking to know exactly which other modules
   might require the utilities.

llvm-svn: 144751
2011-11-16 01:19:19 +00:00
Daniel Dunbar 2f9c1404dd lib/{ppc,x86_64}: Fixup a number of files to include int_lib.h instead of
directly including system headers.

llvm-svn: 144750
2011-11-16 01:19:16 +00:00
Daniel Dunbar 7557f0248a lib: Remove math.h from int_lib.h, which doesn't appear to be required.
llvm-svn: 144749
2011-11-16 01:19:12 +00:00
Kostya Serebryany db999c01f2 test commit to verify that commit access works (added blank line)
llvm-svn: 144748
2011-11-16 01:14:38 +00:00
Owen Anderson ca2f78a95b Rename MVT::untyped to MVT::Untyped to match similar nomenclature.
llvm-svn: 144747
2011-11-16 01:02:57 +00:00
Andrew Trick 90c7a108ca Fix SCEV overly optimistic back edge taken count for multi-exit loops.
Fixes PR11375: Different results for 'clang++ huh.cpp'...

llvm-svn: 144746
2011-11-16 00:52:40 +00:00
Eli Friedman d20adbdce3 Fix a bunch of really nasty bugs in how we compute alignment for reference lvalues. PR11376.
llvm-svn: 144745
2011-11-16 00:42:57 +00:00
Sean Callanan ed8d58fcc1 Fixed a crash when we merrily went on to try to log
information about a nonexistent function declaration.

llvm-svn: 144744
2011-11-16 00:40:13 +00:00
Chad Rosier af13d767a2 Add FIXME comment.
llvm-svn: 144743
2011-11-16 00:32:20 +00:00
Douglas Gregor 81ac842151 Switch some more of the modules tests over to "-emit-module-from-map",
and remove stray fprintf.

llvm-svn: 144742
2011-11-16 00:21:54 +00:00
Sean Callanan a6cbf06d0a Two fixes for Objetive-C methods that return struct
types.  First, I added handling for the memset intrinsic
in the IR, which is used to zero out the returned struct.
Second, I fixed the object-checking instrumentation
to objc_msgSend_stret, and generally tightened up how
the object-checking functions get inserted.

llvm-svn: 144741
2011-11-16 00:20:50 +00:00
Daniel Dunbar 2c523a6ff0 build/darwin_bni: Remove consistency check I added, I forgot we always load
every platform (even if it isn't being built).

llvm-svn: 144740
2011-11-16 00:20:40 +00:00
Daniel Dunbar 7205b23e79 lib: Include float.h in int_lib.h, and eliminate duplicate includes from a number of source files.
llvm-svn: 144739
2011-11-16 00:20:36 +00:00
Daniel Dunbar 6328e7b1b3 build/darwin_bni: Add a consistency check.
llvm-svn: 144738
2011-11-16 00:20:29 +00:00
Douglas Gregor 2b20cb87f5 Add support for building a module from a module map to the -cc1
interface. This is currently limited to modules with umbrella
headers.

llvm-svn: 144736
2011-11-16 00:09:06 +00:00
Jakob Stoklund Olesen 653183fd5c Enable -widen-vmovs by default.
This will widen 32-bit register vmov instructions to 64-bit when
possible.  The 64-bit vmovd instructions can then be translated to NEON
vorr instructions by the execution dependency fix pass.

The copies are only widened if they are marked as clobbering the whole
D-register.

llvm-svn: 144734
2011-11-15 23:53:18 +00:00
Eric Christopher 0abbd0ef5a Stabilize the output of the dwarf accelerator tables. Fixes a comparison
failure during bootstrap with it turned on.

llvm-svn: 144731
2011-11-15 23:37:17 +00:00
Chad Rosier 291ce47db7 GEPs with all zero indices are trivially coalesced by fast-isel. For example,
%arrayidx135 = getelementptr inbounds [4 x [4 x [4 x [4 x i32]]]]* %M0, i32 0, i64 0
%arrayidx136 = getelementptr inbounds [4 x [4 x [4 x i32]]]* %arrayidx135, i32 0, i64 %idxprom134

Prior to this commit, the GEP instruction that defines %arrayidx136 thought that 
%arrayidx135 was a trivial kill.  The GEP that defines %arrayidx135 doesn't 
generate any code and thus %M0 gets folded into the second GEP.  Thus, we need
to look through GEPs with all zero indices.
rdar://10443319

llvm-svn: 144730
2011-11-15 23:34:05 +00:00
Francois Pichet 78286b24fd In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside static functions.
llvm-svn: 144729
2011-11-15 23:33:34 +00:00