Daniel Dunbar
ede182ef05
clang-cc: Start sinking (CodeGen) options into namespaces to limit their scope.
...
llvm-svn: 86690
2009-11-10 17:50:42 +00:00
Chris Lattner
b8f79ba10e
clarify logic.
...
llvm-svn: 86689
2009-11-10 17:00:47 +00:00
Daniel Dunbar
68ac06142b
Cleanup some clang-cc FIXMEs
...
llvm-svn: 86686
2009-11-10 16:23:44 +00:00
Daniel Dunbar
754c11ec48
Add CompileOptions to CompilerInvocation.
...
llvm-svn: 86685
2009-11-10 16:19:45 +00:00
Douglas Gregor
66df54f92c
CMake: Add Darwin-specific linker flags for building loadable modules
...
llvm-svn: 86684
2009-11-10 15:30:33 +00:00
Duncan Sands
1925d3a1d1
Teach DSE to eliminate useless trampolines.
...
llvm-svn: 86683
2009-11-10 13:49:50 +00:00
Duncan Sands
04e0c95248
Add brackets to make gcc-4.4 happy.
...
llvm-svn: 86681
2009-11-10 09:32:10 +00:00
John McCall
b8be78b753
Fix a similar problem with qualified lookup through using directives,
...
although in this case we probably just run a risk of duplicating work;
I can't think of how this could cause a bug.
llvm-svn: 86680
2009-11-10 09:25:37 +00:00
John McCall
9757d0363d
Make a somewhat more convincing test case for unqualified lookup through
...
using directives, and fix a bug thereby exposed: since we're playing
tricks with pointers, we need to make certain we're always using the same
pointers for things.
Also tweak an existing error message.
llvm-svn: 86679
2009-11-10 09:20:04 +00:00
Duncan Sands
dca0c28452
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
...
just throw them away.
llvm-svn: 86678
2009-11-10 09:08:09 +00:00
Zhongxing Xu
f9667229a1
Ignore parentheses when check the type of the expr.
...
llvm-svn: 86677
2009-11-10 08:33:44 +00:00
Victor Hernandez
fcc77b1c02
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
...
llvm-svn: 86676
2009-11-10 08:32:25 +00:00
Victor Hernandez
4744488e8d
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
...
llvm-svn: 86675
2009-11-10 08:28:35 +00:00
John McCall
a31577ce9a
Simple test case for [basic.lookup.udir].
...
llvm-svn: 86674
2009-11-10 07:56:40 +00:00
Zhongxing Xu
537db5d652
SizeofPointerChecker: Many false positives have the form 'sizeof *p'.
...
This is reasonable because people know what they are doing when they
intentionally dereference the pointer.
So now we only emit warning when a pointer variable is use literally.
llvm-svn: 86673
2009-11-10 07:52:53 +00:00
Chris Lattner
17529ac0c5
optimize test
...
llvm-svn: 86672
2009-11-10 07:44:36 +00:00
Mike Stump
d846d0825b
Add vtable caching to prevent multiple vtables for the same class from
...
being generated.
Add the most derived vtable pointer to the VTT.
llvm-svn: 86671
2009-11-10 07:44:33 +00:00
Chris Lattner
1559bedcc7
unify the code that determines whether it is a good idea to change the type
...
of a computation. This fixes some infinite loops when dealing with TD that
has no native types.
llvm-svn: 86670
2009-11-10 07:23:37 +00:00
John McCall
f6c8a4ef1f
Fix unqualified lookup through using directives.
...
This is a pretty minimal test case; I'll make a better one later.
llvm-svn: 86669
2009-11-10 07:01:13 +00:00
Nick Lewycky
5b3def9b86
Simplify.
...
llvm-svn: 86668
2009-11-10 07:00:43 +00:00
Nick Lewycky
9027147fb1
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
...
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
llvm-svn: 86667
2009-11-10 06:46:40 +00:00
Chris Lattner
cbd18fc93d
refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.
...
llvm-svn: 86666
2009-11-10 05:59:26 +00:00
Anders Carlsson
ace5d07e50
When trying to assign a regular string literal to an Objective-C 'id' type or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example:
...
@class NSString;
@interface Test
+ (void)test:(NSString *)string;
@end
void g(NSString *a);
void f() {
NSString *a = "Foo";
g("Foo");
[Test test:"Foo"];
}
will produce
t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *'
NSString *a = "Foo";
^~~~~
@
t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *'
g("Foo");
^~~~~
@
t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *'
[Test test:"Foo"];
^~~~~
@
3 diagnostics generated.
llvm-svn: 86665
2009-11-10 04:46:30 +00:00
Anders Carlsson
7ddc6a98a7
Don't try to emit null fixit hints.
...
llvm-svn: 86664
2009-11-10 04:36:33 +00:00
Zhongxing Xu
456706c205
Now we can safely use the argument expression's source range.
...
llvm-svn: 86663
2009-11-10 04:22:08 +00:00
Zhongxing Xu
9a7448ceef
SizeofPointerChecker: If an explicit type specifier is used, do not issue warnings.
...
llvm-svn: 86662
2009-11-10 04:20:20 +00:00
Anders Carlsson
1566eb5a26
Use PP.getLocForEndOfToken as suggested by John.
...
llvm-svn: 86661
2009-11-10 03:32:44 +00:00
Zhongxing Xu
77c470e8c7
Use the source range of the whole sizeof expression, otherwise it crashes when
...
the argument is not an expression.
llvm-svn: 86660
2009-11-10 03:27:00 +00:00
Anders Carlsson
0b8ea554e5
If a function with a default argument is redefined and the new function also has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444.
...
llvm-svn: 86659
2009-11-10 03:24:44 +00:00
Anders Carlsson
f5e98fcff4
Update xode project.
...
llvm-svn: 86658
2009-11-10 03:23:35 +00:00
Zhongxing Xu
70ba4908d0
Add test case for PointerSubChecker.
...
llvm-svn: 86657
2009-11-10 02:45:49 +00:00
Oscar Fuentes
bbc1067001
CMake: Support for building llvm loadable modules.
...
llvm-svn: 86656
2009-11-10 02:45:37 +00:00
Daniel Dunbar
5a5b223c04
lit: Start documentation testing architecture.
...
llvm-svn: 86655
2009-11-10 02:41:27 +00:00
Daniel Dunbar
8acffa7dd5
lit: Add ExampleTests, for testing lit and demonstrating test suite features.
...
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
4010a04034
lit: Fix bug in --show-suites which accidentally override the list of tests.
...
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Zhongxing Xu
80bbc6d138
Refine PointerSubChecker: compare the base region instead of the original
...
region, so that arithmetic within a memory chunk is allowed.
llvm-svn: 86652
2009-11-10 02:37:53 +00:00
Bruno Cardoso Lopes
05671ea10a
Fix PR5445
...
llvm-svn: 86651
2009-11-10 02:35:13 +00:00
Mike Stump
9f23a149cb
Be sure to clear out VCall when we clear out VCalls.
...
Start implementing VTTs. WIP.
llvm-svn: 86650
2009-11-10 02:30:51 +00:00
Zhongxing Xu
f8f3f9ddbc
Rename: StripCasts describes what it does better.
...
getBaseRegion will be used in another method.
llvm-svn: 86649
2009-11-10 02:17:20 +00:00
Chris Lattner
ab799110c6
I misread the parens, not so redundant after all.
...
llvm-svn: 86648
2009-11-10 02:04:54 +00:00
Mike Stump
3b9176985d
Finish off mangling for the VTT.
...
llvm-svn: 86647
2009-11-10 01:58:37 +00:00
Chris Lattner
38c44ea6b0
make jump threading recursively simplify expressions instead of doing it
...
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
llvm-svn: 86646
2009-11-10 01:57:31 +00:00
Chris Lattner
ee89d5a4d0
remove some redundant parens.
...
llvm-svn: 86645
2009-11-10 01:56:04 +00:00
Oscar Fuentes
b8d7793628
CMake: Remove unnecessary `unset' which was not supported by old cmake
...
releases.
llvm-svn: 86644
2009-11-10 01:45:05 +00:00
Mike Stump
ef15744092
Add mangling for the construction vtable.
...
llvm-svn: 86643
2009-11-10 01:41:59 +00:00
Dan Gohman
42cc1806d8
Remove an unused variable.
...
llvm-svn: 86642
2009-11-10 01:37:57 +00:00
Dan Gohman
48079d4bf5
Minor code simplification.
...
llvm-svn: 86641
2009-11-10 01:36:20 +00:00
Dan Gohman
0d401124d1
Trim a bunch of unneeded code from this testcase.
...
llvm-svn: 86640
2009-11-10 01:33:08 +00:00
Chris Lattner
be11db6894
don't invalidate PN, rewrite of this code is in progress anyway.
...
llvm-svn: 86639
2009-11-10 01:19:06 +00:00
Jeffrey Yasskin
612e38026a
Fix clang's use of DenseMap iterators after r86636 fixed their constness.
...
Patch by Victor Zverovich!
llvm-svn: 86638
2009-11-10 01:17:45 +00:00