Chris Lattner
e112ff64c5
fix a potential overflow issue Eli pointed out.
...
llvm-svn: 94336
2010-01-23 23:31:46 +00:00
Anders Carlsson
6cabf318c9
Change all InitializedEntity pointers over to be references.
...
llvm-svn: 94335
2010-01-23 23:23:01 +00:00
Anders Carlsson
3fa93b7e54
Start passing InitializedEntity to CheckDesignatedInitializer.
...
llvm-svn: 94334
2010-01-23 22:49:02 +00:00
John McCall
f9b528c7cf
Preserve access for enum constants during template instantiation.
...
llvm-svn: 94333
2010-01-23 22:37:59 +00:00
Anders Carlsson
dbb25a38b9
More init work, adding more entity parameters.
...
llvm-svn: 94332
2010-01-23 20:47:59 +00:00
Nick Lewycky
7e7ed8b9e5
Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.
...
llvm-svn: 94331
2010-01-23 20:32:12 +00:00
Mike Stump
38013e109e
Temporary flip default for -Wunreachable-code so some bots can test it
...
out. They should all be done later tonight, but if something bad
happens, feel free to revert sooner.
llvm-svn: 94330
2010-01-23 20:23:40 +00:00
Anders Carlsson
73eb7cd351
Use the new init code for member subobjects.
...
llvm-svn: 94329
2010-01-23 20:20:40 +00:00
Anders Carlsson
0cf999b663
Switch some array initialization over to the new init code.
...
llvm-svn: 94327
2010-01-23 20:13:41 +00:00
Mike Stump
0978af83b3
Insulate these from changes to the default for -Wunreachable-code.
...
llvm-svn: 94326
2010-01-23 20:12:18 +00:00
Anders Carlsson
d0849254de
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
...
llvm-svn: 94325
2010-01-23 19:55:29 +00:00
Anders Carlsson
3cc795ae8d
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload.
...
llvm-svn: 94324
2010-01-23 19:22:30 +00:00
Chris Lattner
29b15c5cfd
third bug from PR6119: the xor dupe extension allows
...
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch. The testcase shows
an example where they can happen with switches.
llvm-svn: 94323
2010-01-23 19:21:31 +00:00
Nick Lewycky
32966aed9d
Teach DAE that even though it can't modify the function signature of an
...
externally visible function, it can still find all callers of it and replace
the parameters to a dead argument with undef.
llvm-svn: 94322
2010-01-23 19:19:34 +00:00
Chris Lattner
ba2d0b89ff
add an early out to ProcessBranchOnXOR to speed it up,
...
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop. Another part of PR6199
llvm-svn: 94321
2010-01-23 19:16:25 +00:00
Eli Friedman
d6ef69a7db
Add bzero builtin; this should help codegen quality for code using this
...
function.
llvm-svn: 94320
2010-01-23 19:00:10 +00:00
Chris Lattner
de5ab4860f
fix a crash in jump threading, PR6119
...
llvm-svn: 94319
2010-01-23 18:56:07 +00:00
Chris Lattner
249da5cb73
implement a simple instcombine xform that has been in the
...
readme forever.
llvm-svn: 94318
2010-01-23 18:49:30 +00:00
Chris Lattner
97331ae668
add a note
...
llvm-svn: 94317
2010-01-23 18:42:37 +00:00
Anders Carlsson
26d0564fd1
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change.
...
llvm-svn: 94316
2010-01-23 18:35:41 +00:00
Anders Carlsson
7802f31bfc
Fix typo.
...
llvm-svn: 94315
2010-01-23 18:26:49 +00:00
Benjamin Kramer
12a6ce7cad
Simplify code with StringRef.
...
llvm-svn: 94314
2010-01-23 18:16:35 +00:00
Benjamin Kramer
8f8f405c71
No need to terminate this buffer.
...
llvm-svn: 94313
2010-01-23 18:16:07 +00:00
Chris Lattner
082da53f9a
add some notes, making posix-memalign be nocapture would be an easy improvement.
...
llvm-svn: 94312
2010-01-23 17:59:23 +00:00
Ted Kremenek
3e315a28b1
Add doxygen comment to clang_getClangVersion().
...
llvm-svn: 94311
2010-01-23 17:51:23 +00:00
Bill Wendling
8cbc25d945
Remove the '-disable-scheduling' flag and replace it with the 'source' option of
...
the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also,
keep track of the SDNode ordering by default. Eventually, we would like to make
this ordering a way to break a "tie" in the scheduler. However, doing that now
breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux.
llvm-svn: 94308
2010-01-23 10:26:57 +00:00
Benjamin Kramer
20bac07abb
Adjust testcase for recent AsmPrinter changes, sigh.
...
llvm-svn: 94307
2010-01-23 10:15:32 +00:00
Benjamin Kramer
b2abc13f28
Adjust testcase for recent DWARF printer changes.
...
llvm-svn: 94306
2010-01-23 10:14:58 +00:00
Benjamin Kramer
14bb114c92
Respect operator precedence (and silence a gcc 4.3 warning).
...
llvm-svn: 94304
2010-01-23 09:54:23 +00:00
John McCall
6d174646dd
Produce a special diagnostic when users call a function with an argument of
...
incomplete type (or a pointer/reference to such).
The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.
This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.
llvm-svn: 94303
2010-01-23 08:10:49 +00:00
Chris Lattner
b1301f7bce
mcize lcomm, simplify .comm, extend both to support 64-bit sizes.
...
llvm-svn: 94299
2010-01-23 07:47:02 +00:00
Chris Lattner
76bdea3290
resolve a fixme: the "nonexecutable stack directive" is actually
...
a .section. Switch to it with SwitchSection.
However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.
llvm-svn: 94298
2010-01-23 07:21:06 +00:00
Chris Lattner
e244ff35d8
remove a dead call.
...
llvm-svn: 94297
2010-01-23 07:17:54 +00:00
Chris Lattner
c55ea3fbcc
use helpers.
...
llvm-svn: 94296
2010-01-23 07:00:21 +00:00
Chris Lattner
0bfd279b37
mcize visibility directives.
...
llvm-svn: 94295
2010-01-23 06:53:23 +00:00
Chris Lattner
685508cf49
move the various directive enums out of the MCStreamer class
...
into a new MCDirectives.h file.
llvm-svn: 94294
2010-01-23 06:39:22 +00:00
Chris Lattner
d1acffc845
Change constantexpr global variable initializers to convert the constants
...
to MCExpr then emit them through MCStreamer with EmitValue. I think all
global variable initializers are now going through mcstreamer.
llvm-svn: 94293
2010-01-23 06:17:14 +00:00
Eric Christopher
c1451d764f
Don't lower splat vector load to relative to the esp if the
...
stack may be misaligned.
Update test accordingly.
Patch by Evan Cheng!
llvm-svn: 94291
2010-01-23 06:02:43 +00:00
Chris Lattner
1deb09c28d
mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
...
llvm-svn: 94290
2010-01-23 05:51:36 +00:00
Anders Carlsson
8e01dcf6f6
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)
...
llvm-svn: 94289
2010-01-23 05:47:27 +00:00
Chris Lattner
82b86b0fce
stop testing for invalid output.
...
llvm-svn: 94288
2010-01-23 05:45:28 +00:00
Eric Christopher
ba7cd4c393
Reapply 94059 while fixing the calling convention setup
...
for strcpy.
llvm-svn: 94287
2010-01-23 05:29:06 +00:00
Chris Lattner
b065f1bc31
remove unneeded directive set.
...
llvm-svn: 94286
2010-01-23 05:28:25 +00:00
Chris Lattner
5241cde324
use some helpers instead of duplicating logic.
...
llvm-svn: 94285
2010-01-23 05:26:25 +00:00
Chris Lattner
4225a7b987
mcize jump table and constant pool entry labels, .local on elf,
...
and some .weak directives.
llvm-svn: 94284
2010-01-23 05:19:23 +00:00
John McCall
fe796ddd5a
During overload resolution diagnostics, sort non-viable candidates by the quality of their
...
conversions. To make this work, fill out all conversions for all candidates
(but only when diagnosing overload failure). Split out a few cases from
ovl_fail_bad_conversion which didn't actually involve a failed argument
conversion.
I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters.
llvm-svn: 94283
2010-01-23 05:17:32 +00:00
Chris Lattner
68eeb5ec9c
emit .ascii and .asciz through MCStreamer.
...
llvm-svn: 94282
2010-01-23 04:54:10 +00:00
Chris Lattner
531732b23c
simplify code a bit.
...
llvm-svn: 94281
2010-01-23 04:42:42 +00:00
Mon P Wang
e04b4567f8
InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
...
llvm-svn: 94280
2010-01-23 04:35:57 +00:00
Anders Carlsson
ed8d80d72b
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment.
...
llvm-svn: 94279
2010-01-23 04:34:47 +00:00