Commit Graph

43498 Commits

Author SHA1 Message Date
Evan Cheng 86cb31862f Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Chris Lattner 9c0c60d080 no need for eh info
llvm-svn: 50658
2008-05-05 18:24:33 +00:00
Ted Kremenek 3917b82e85 Improved leak diagnostics.
llvm-svn: 50657
2008-05-05 17:53:17 +00:00
Evan Cheng b8c818026c Fix 80 column violations.
llvm-svn: 50655
2008-05-05 17:41:03 +00:00
Anton Korobeynikov 4b0386ce62 Fix 80col violation
llvm-svn: 50654
2008-05-05 17:08:59 +00:00
Ted Kremenek 875db81301 Minor refactorings/cleanups in CF retain checker and added support for NSMakeCollectable.
Added test case for NSMakeCollectable.

llvm-svn: 50653
2008-05-05 16:51:50 +00:00
Dan Gohman e3a63ba3cd Fix a bug in the ELF writer that caused it to produce malformed
ELF headers. The ELF writer still isn't generally usable though.

llvm-svn: 50652
2008-05-05 16:48:32 +00:00
Dan Gohman 6fd71c6512 Use a dedicated IsLinux flag instead of an ELFLinux TargetType.
llvm-svn: 50649
2008-05-05 16:11:31 +00:00
Ted Kremenek db04a9e967 When reporting branch conditions that evaluate to an uninitialized value,
highlight the most nested subexpression that appears most responsible (giving
the user better diagnostic feedback).

Updated test cases to illustrate this feature.

Implements: <rdar://problem/5880443>
llvm-svn: 50647
2008-05-05 15:56:53 +00:00
Chris Lattner 7f5b4fcafa Fix a bug from when this was a pointer instead of vector.
llvm-svn: 50639
2008-05-05 07:03:40 +00:00
Chris Lattner 3565c8e343 Neil pointed out that clang doesn't generate ranges from diagnostics
related to pp-expressions.  Doing so is pretty simple and this
patch implements it, yielding nice diagnostics like:

t.c:2:7: error: division by zero in preprocessor expression
#if 1 / (0 + 0)
    ~ ^ ~~~~~~~
t.c:5:14: error: expected ')' in preprocessor expression
#if (412 + 42
     ~~~~~~~~^
t.c:5:5: error: to match this '('
#if (412 + 42
    ^
t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
     ~~~ ^ ~~
t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
    ~~~~~~~~~~ ^ ~~
5 diagnostics generated.

llvm-svn: 50638
2008-05-05 06:45:50 +00:00
Chris Lattner 3c57f7ebab fix a bug handling right associative operators that Neil noticed, hopefully
the final part of PR2279

llvm-svn: 50635
2008-05-05 04:10:51 +00:00
Dan Gohman bcde172222 Add AsmPrinter support for emitting a directive to declare that
the code being generated does not require an executable stack.

Also, add target-specific code to make use of this on Linux
on x86. 

llvm-svn: 50634
2008-05-05 00:28:39 +00:00
Chris Lattner de977c0a5c Fix PR2281: these two warnings should be promoted to error on
pedantic error.  Perhaps I should add a class of 'extension' that is
'extension that warns by default', which would be cleaner.

llvm-svn: 50633
2008-05-04 23:52:02 +00:00
Chris Lattner ca671b0e51 ||/&& do not do UAC's either. This silences a bogus warning on #if -1 || 4U.
llvm-svn: 50632
2008-05-04 23:46:17 +00:00
Chris Lattner 4af72c76dd Neil points out that commas don't do UACs either.
llvm-svn: 50631
2008-05-04 23:38:48 +00:00
Anton Korobeynikov 9205c8562c Add General Dynamic TLS model for X86-64. Some parts looks really ugly (look for tlsaddr pattern),
but should work. Work is in progress, more models will follow

llvm-svn: 50630
2008-05-04 21:36:32 +00:00
Owen Anderson 9d990dd218 Fix PR1098 by correcting the postdominators analysis.
Patch by Florian Brandner.

llvm-svn: 50628
2008-05-04 21:07:35 +00:00
Chris Lattner d89e458ce0 Fix the rest of PR2279:
a) correct rejection of ',' in pp expressions.
b) the precedence of ',' was wrong w.r.t. ?:.

Thanks again to Neil for finding these and providing testcases.

llvm-svn: 50625
2008-05-04 18:36:18 +00:00
Chris Lattner a08f869c22 Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
for pointing this out.

llvm-svn: 50624
2008-05-04 18:25:32 +00:00
Chris Lattner 1e151816b2 use simplified API for making fp constants.
llvm-svn: 50623
2008-05-04 18:23:51 +00:00
Chris Lattner 304f209a07 remove obsolete method.
llvm-svn: 50622
2008-05-04 18:14:55 +00:00
Chris Lattner c17c8f3ec4 regenerate
llvm-svn: 50621
2008-05-04 17:18:47 +00:00
Gordon Henriksen a735a9c481 Use (void) instead of () in C code.
llvm-svn: 50620
2008-05-04 12:55:34 +00:00
Evan Cheng d9481366e3 Select vector shift with non-immediate i32 shift amount operand by first moving the operand into the right register.
llvm-svn: 50619
2008-05-04 09:15:50 +00:00
Torok Edwin 2d7a4d70c3 processStore may delete the instruction, avoid
using dyn_cast<> on already freed memory.

llvm-svn: 50618
2008-05-04 08:51:25 +00:00
Chris Lattner 0a9718eab0 fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).
llvm-svn: 50617
2008-05-04 07:15:21 +00:00
Anton Korobeynikov 60d2d99b11 Remove entries from here also
llvm-svn: 50616
2008-05-04 06:23:44 +00:00
Anton Korobeynikov 625f4fee4d Drop llvmc also, it will be replaced by shiny new llvmc2
llvm-svn: 50615
2008-05-04 06:19:55 +00:00
Anton Korobeynikov a41f7f8985 Drop llvm2cpp, it's now a llc target
llvm-svn: 50614
2008-05-04 06:16:50 +00:00
Chris Lattner 7b9293ba20 Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the 
DeclAttrs map.

llvm-svn: 50612
2008-05-04 02:29:49 +00:00
Chris Lattner bc22b5b327 if a decl is both 'static' and weak or static and inline, its linkage
type should be internal, not weak/linkonce.

llvm-svn: 50611
2008-05-04 01:44:26 +00:00
Chris Lattner cfcabaeb7f add testcase for pr2050 which is now fixed.
llvm-svn: 50610
2008-05-04 01:13:36 +00:00
Chris Lattner c8cb4ca202 improve array type comments.
llvm-svn: 50609
2008-05-04 01:11:46 +00:00
Chris Lattner 033352b036 add a testcase
llvm-svn: 50608
2008-05-04 00:56:25 +00:00
Torok Edwin 2a45575c71 Implement destructor for PostDominatorTree to eliminate a memory leak.
llvm-svn: 50607
2008-05-03 20:25:26 +00:00
Devang Patel fa0e3c4a92 Handle multiple return values.
llvm-svn: 50604
2008-05-03 01:12:15 +00:00
Ted Kremenek 9f620f7d92 Implement operator-> for ImmutableMap iterators.
llvm-svn: 50603
2008-05-03 01:05:46 +00:00
Evan Cheng cdf22f2953 Add separate intrinsics for MMX / SSE shifts with i32 integer operands. This allow us to simplify the horribly complicated matching code.
llvm-svn: 50601
2008-05-03 00:52:09 +00:00
Devang Patel a1ec89fbf1 Do not sink getresult.
llvm-svn: 50600
2008-05-03 00:36:30 +00:00
Ted Kremenek 1108d6eef3 Remove debugging statement.
llvm-svn: 50598
2008-05-02 23:40:49 +00:00
Ted Kremenek a5e2df015a Rename member variable.
llvm-svn: 50597
2008-05-02 23:21:21 +00:00
Devang Patel ab8cacee2d Add assert.
llvm-svn: 50596
2008-05-02 22:13:33 +00:00
Chris Lattner 6238dada27 verify builtin optimization works like gcc.
llvm-svn: 50594
2008-05-02 22:07:34 +00:00
Chris Lattner e3b320bd4b move libcalls to the same place llvm-gcc has it.
llvm-svn: 50593
2008-05-02 22:05:06 +00:00
Ted Kremenek 5f56cbbf7d Output better paths to display in bug reports and compute a common
prefix for all files.

llvm-svn: 50592
2008-05-02 22:04:53 +00:00
Dan Gohman 1962c2be6a Fix a mistake in the computation of leading zeros for udiv.
llvm-svn: 50591
2008-05-02 21:30:02 +00:00
Evan Cheng 82b9e96274 Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.
llvm-svn: 50590
2008-05-02 21:15:08 +00:00
Fariborz Jahanian 9964c9c64d Another test case for properties in protocols.
llvm-svn: 50589
2008-05-02 21:09:40 +00:00
Ted Kremenek 983be7cee6 Improved diagnostics for leaks: now we report which variable was leaked.
llvm-svn: 50588
2008-05-02 20:53:50 +00:00