Victor Hernandez
ce99780980
CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct calling convention
...
llvm-svn: 86290
2009-11-06 21:43:21 +00:00
Eli Friedman
a70917b2f4
Remove function left over from other jump threading cleanup.
...
llvm-svn: 86289
2009-11-06 21:24:57 +00:00
Ted Kremenek
53a70c055d
Make the implementation of DivZeroChecker private.
...
llvm-svn: 86288
2009-11-06 20:47:51 +00:00
Fariborz Jahanian
e8e631c912
Prevent a code gen. crash on empty unions - pr5408.
...
llvm-svn: 86287
2009-11-06 20:47:40 +00:00
Ted Kremenek
e3423e84a9
testing: Merge PR3135.c into misc-ps-region-store.m.
...
llvm-svn: 86286
2009-11-06 20:32:38 +00:00
Ted Kremenek
df9ca633b6
Sentence-case bug type, and pull tests from region-only-test.c into misc-ps-region.store.m (removing an extra unneeded test file). Also add a bunch of FIXME comments for future enhancements.
...
llvm-svn: 86282
2009-11-06 20:16:31 +00:00
Gabor Greif
445737df6a
fix typo
...
llvm-svn: 86281
2009-11-06 20:10:46 +00:00
Chris Lattner
a8b9ce3f07
Fix a problem discovered on self host.
...
llvm-svn: 86278
2009-11-06 19:21:48 +00:00
Anders Carlsson
443f677302
Simplify the debug info code, handle lvalue references and template specializations.
...
llvm-svn: 86277
2009-11-06 19:19:55 +00:00
Fariborz Jahanian
c2d71b531c
This patch fixes code gen. part of pr5333 (Conversion
...
using elipsis conversion).
llvm-svn: 86276
2009-11-06 18:47:57 +00:00
Anders Carlsson
8a6512961f
Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.
...
llvm-svn: 86274
2009-11-06 18:45:16 +00:00
Nuno Lopes
ac5eba93ca
add test case for PR3135 which was already fixed
...
llvm-svn: 86273
2009-11-06 18:42:13 +00:00
Chris Lattner
d91a7960bf
remove more code subsumed by r86264
...
llvm-svn: 86270
2009-11-06 18:24:32 +00:00
Devang Patel
33e0c99d67
Tolerate invalid derived type.
...
llvm-svn: 86269
2009-11-06 18:24:05 +00:00
Anders Carlsson
25ed5c2f42
Don't assert when trying to generate debug info for vector types. This needs to be fixed eventually...
...
llvm-svn: 86268
2009-11-06 18:24:04 +00:00
Chris Lattner
899ef22acb
eliminate some more code subsumed by r86264
...
llvm-svn: 86267
2009-11-06 18:22:54 +00:00
Chris Lattner
2f6184f6aa
remove now redundant code, r86264 handles this case.
...
llvm-svn: 86266
2009-11-06 18:20:58 +00:00
John McCall
e2c91e6b26
Don't warn -Wsign-compare if we're in an unevaluated context, and fixed
...
a typo pointed out by Fariborz.
llvm-svn: 86265
2009-11-06 18:16:06 +00:00
Chris Lattner
68d2417e05
Extend jump threading to support much more general threading
...
predicates. This allows us to jump thread things like:
_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
%tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ]
%toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0 ; <i1> [#uses=1]
%tmp4.i90 = icmp eq i32 %tmp2.i, 6 ; <i1> [#uses=1]
%or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90 ; <i1> [#uses=1]
br i1 %or.cond173, label %bb4.i96, label %_ZN12...
Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always
false. This triggers a surprisingly high number of times in the testsuite,
and gets us closer to generating good code for doug's strswitch testcase.
This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch. This survived an enable-checking llvm-gcc bootstrap.
llvm-svn: 86264
2009-11-06 18:15:14 +00:00
Chris Lattner
353fc1e447
update comment, pointed out by Gabor
...
llvm-svn: 86263
2009-11-06 18:10:47 +00:00
Dan Gohman
0080ee2d91
Use WriteAsOperand to print GlobalAddress MachineOperands. This
...
prints them with the leading '@'.
llvm-svn: 86261
2009-11-06 18:03:10 +00:00
Chris Lattner
45540e91d1
add some const qualifiers, patch by Kovarththanan Rajaratnam!
...
llvm-svn: 86260
2009-11-06 18:01:14 +00:00
Devang Patel
cc11371b77
Do not bother to emit debug info for nameless global variable.
...
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Chris Lattner
4f24225e8e
indirectbr seems to work! Rip out the old code.
...
llvm-svn: 86256
2009-11-06 17:38:18 +00:00
Anders Carlsson
eb9bc2ba82
Instead of returning a null DIType for unhandled types, assert.
...
llvm-svn: 86254
2009-11-06 17:01:39 +00:00
Zhongxing Xu
167bce9cf1
Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.
...
llvm-svn: 86252
2009-11-06 13:30:44 +00:00
Daniel Dunbar
ad36e8aceb
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
John McCall
e46fd8531c
compare.c also needs a target triple now, and improve some comments while we're
...
at it.
llvm-svn: 86243
2009-11-06 08:53:51 +00:00
John McCall
99ce6bfe28
Improve the -Wsign-compare heuristics:
...
* If the unsigned type is smaller than the signed type, never warn, because
its value will not change when zero-extended to the larger type.
* If we're testing for (in)equality, and the unsigned value is an integer
constant whose sign bit is not set, never warn, because even though the
signed value might change, it can't affect the result of the equality.
Also make the comparison test cases much more rigorous, and have them expose
the subtle differences between C and C++ here.
llvm-svn: 86242
2009-11-06 08:49:08 +00:00
John McCall
d59dd65fa4
Create a warning group "non-gcc" for diagnostics which are not enabled
...
by default in GCC. Users who want to emulate gcc's warning behavior
exactly should be able to use CC="clang -Wno-non-gcc"; this should help
projects to transition.
llvm-svn: 86241
2009-11-06 07:53:21 +00:00
Chris Lattner
3e4fac7408
add some fixit hints.
...
llvm-svn: 86240
2009-11-06 06:40:12 +00:00
Chris Lattner
81f1b31c96
clang++ points out that this is pointless.
...
llvm-svn: 86239
2009-11-06 06:33:01 +00:00
Douglas Gregor
d82ae38d53
Rework the fix-it hint for code like
...
get_origin->x
where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.
llvm-svn: 86238
2009-11-06 06:30:47 +00:00
Chris Lattner
8c12bb8cd7
remove some more Context arguments.
...
llvm-svn: 86235
2009-11-06 05:59:53 +00:00
Douglas Gregor
f4f2ff773b
Improve recovery when we fail to parse the operand of a C++ named cast. Fixes PR5210
...
llvm-svn: 86234
2009-11-06 05:48:00 +00:00
Douglas Gregor
6af6c3ee56
Turn off -Wsign-compare warnings by default
...
llvm-svn: 86233
2009-11-06 05:24:12 +00:00
Chris Lattner
46b5c642b9
remove a bunch of extraneous LLVMContext arguments
...
from various APIs, addressing PR5325.
llvm-svn: 86231
2009-11-06 04:27:31 +00:00
Anders Carlsson
421a5c9651
If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.
...
llvm-svn: 86230
2009-11-06 04:19:02 +00:00
Daniel Dunbar
529f913f55
NewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).
...
llvm-svn: 86229
2009-11-06 04:12:13 +00:00
Daniel Dunbar
04b3960bfe
NewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building LLVM (for testing).
...
Also, switch to always running 'make clean' in the test-suite directories.
llvm-svn: 86228
2009-11-06 04:12:07 +00:00
Daniel Dunbar
9e0febb2c7
NewNightlyTest: Unbreak passing the build directory via a positional argument.
...
llvm-svn: 86227
2009-11-06 04:12:02 +00:00
Daniel Dunbar
545ffe6fc1
NewNightlyTest: Add -llvmgccdir as alternative to environment variable.
...
llvm-svn: 86226
2009-11-06 04:11:29 +00:00
Anders Carlsson
5852b13827
If a member initializer create temporaries we need to destroy them. Fixes PR5077.
...
llvm-svn: 86225
2009-11-06 04:11:09 +00:00
Anders Carlsson
a7cb98b202
More cleanup.
...
llvm-svn: 86224
2009-11-06 03:23:06 +00:00
Anders Carlsson
438cf92533
Cleanup ctor/dtor emission.
...
llvm-svn: 86222
2009-11-06 02:55:43 +00:00
Anders Carlsson
9e4e0237e4
Handle ParenExprs in mangleExpression.
...
llvm-svn: 86218
2009-11-06 02:50:19 +00:00
Mike Stump
72431bd9ea
Refine the vcall for a function that is defined in a virtual base
...
class that is overridden in a base that isn't morally virtual.
llvm-svn: 86217
2009-11-06 02:38:24 +00:00
Ted Kremenek
bee01e5b61
static analyzer: refactor checking logic for returning the address of a stack variable or a garbage
...
value into their own respective subclasses of Checker (and put them in .cpp files where their
implementation details are hidden from GRExprEngine).
llvm-svn: 86215
2009-11-06 02:24:13 +00:00
Victor Hernandez
b9f5899779
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
...
llvm-svn: 86213
2009-11-06 01:33:24 +00:00
Devang Patel
06ce6506d2
Do not try to emit debug info entry for dead global variable.
...
llvm-svn: 86212
2009-11-06 01:30:04 +00:00