Rafael Espindola
46129b0934
Use StringRef::split instead of SplitString.
...
llvm-svn: 87085
2009-11-13 05:13:58 +00:00
Rafael Espindola
ff2c72b858
Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
...
"a" + 0.
llvm-svn: 87084
2009-11-13 04:55:09 +00:00
Anders Carlsson
e828c36933
Add a special BuildVirtualCall that's going to be used for building calls to destructors. This is needed because when compiling:
...
struct A {
virtual ~A();
};
void f(A* a) {
delete a;
}
A's deleting destructor should be called.
llvm-svn: 87083
2009-11-13 04:45:41 +00:00
Anders Carlsson
78cfaa9e56
Fix two bugs with temporaries:
...
1. For
A f() {
return A();
}
we were incorrectly calling the A destructor on the returned object.
2. For
void f(A);
void g() {
A a;
f(a);
}
we were incorrectly not calling the copy constructor.
llvm-svn: 87082
2009-11-13 04:34:45 +00:00
Anders Carlsson
87f84c1e72
Move GlobalDecl to its own file. Also add DenseMapInfo traits.
...
llvm-svn: 87081
2009-11-13 04:25:07 +00:00
Daniel Dunbar
546a676ae5
Add {File,Source}Manager to CompilerInstance.
...
llvm-svn: 87079
2009-11-13 04:12:06 +00:00
Daniel Dunbar
636404a330
Add CompilerInstance, and starting moving clang-cc to it.
...
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.
llvm-svn: 87078
2009-11-13 03:51:44 +00:00
Ted Kremenek
2466e0d92f
Only flush plist diagnostics once.
...
llvm-svn: 87073
2009-11-13 03:14:14 +00:00
Ted Kremenek
da00234109
Fix recently introduced use-after-free error reported in <rdar://problem/7387478>.
...
llvm-svn: 87072
2009-11-13 03:02:57 +00:00
Mike Stump
fa81808a11
Refine construction vtables; they don't include bits that don't have
...
virtual bases unless they are morally virtual.
llvm-svn: 87071
2009-11-13 02:35:38 +00:00
Devang Patel
76a06074eb
Revert r87059 for now. It is failing clang tests.
...
llvm-svn: 87070
2009-11-13 02:27:33 +00:00
Devang Patel
97f99fa554
Ignore nameless variables.
...
llvm-svn: 87069
2009-11-13 02:25:26 +00:00
Rafael Espindola
7c6854995d
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
...
llvm-svn: 87068
2009-11-13 02:18:25 +00:00
Mike Stump
653d0b99df
Refine the construction vtables with respect to offsets. WIP.
...
llvm-svn: 87067
2009-11-13 02:13:54 +00:00
Daniel Dunbar
27b19dc1b5
Move input kind identification (-x) into FrontendOptions.
...
llvm-svn: 87066
2009-11-13 02:06:12 +00:00
Ted Kremenek
3c55718016
Pull static variable within function (for slightly faster startup time).
...
llvm-svn: 87065
2009-11-13 01:58:01 +00:00
Mike Stump
83066c8dee
Allow the tracking of address points for construction vtables as well.
...
llvm-svn: 87063
2009-11-13 01:54:23 +00:00
Ted Kremenek
a2968e59e3
retain/release checker: refactor some of the summary lookup logic for instance method summaries. No real functionality change, but it paves the way for new enhancements.
...
llvm-svn: 87062
2009-11-13 01:54:21 +00:00
Dale Johannesen
5f4eecf961
Adjust isConstantSplat to allow for big-endian targets.
...
PPC is such a target; make it work.
llvm-svn: 87060
2009-11-13 01:45:18 +00:00
Victor Hernandez
41e7648e09
Remove unnecessary llvm.dbg.declare bitcast
...
llvm-svn: 87059
2009-11-13 01:44:55 +00:00
Rafael Espindola
d554e44092
Add a new split method to StringRef that puts the substrings in a vector.
...
llvm-svn: 87058
2009-11-13 01:24:40 +00:00
Jim Grosbach
46a524c3e8
Block renumbering
...
llvm-svn: 87056
2009-11-13 01:19:24 +00:00
Jim Grosbach
969910b3e8
use lower case for readability
...
llvm-svn: 87054
2009-11-13 01:17:22 +00:00
Ted Kremenek
aedb7434c8
Add clang-cc option "-analyzer-experimental-checks" to enable experimental path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control.
...
llvm-svn: 87053
2009-11-13 01:15:47 +00:00
Daniel Dunbar
1e886ebe8c
Move -target-{triple,abi} options into FrontendOptions.
...
llvm-svn: 87051
2009-11-13 01:02:19 +00:00
Daniel Dunbar
4a1f60f777
Move code completion options to clang-cc
...
llvm-svn: 87050
2009-11-13 01:02:10 +00:00
Daniel Dunbar
3f75f5ddcb
Update test.
...
llvm-svn: 87049
2009-11-13 01:01:58 +00:00
Chris Lattner
956d71a63a
add a fixme, inheriting from PointerIntPair is gross :)
...
llvm-svn: 87048
2009-11-13 00:57:01 +00:00
David Greene
2f4c37425b
Fix a bootstrap failure.
...
Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE
interfaces to explicitly request checking for post-frame ptr elimination
operands. This uses a heuristic so it isn't reliable for correctness.
llvm-svn: 87047
2009-11-13 00:29:53 +00:00
Daniel Dunbar
a5c3d989fb
Move FixItAtLocations into FrontendOptions
...
llvm-svn: 87046
2009-11-12 23:52:56 +00:00
Daniel Dunbar
eb51586a85
clang-cc: Keep Verbose option with HeaderSearchOptions, for now.
...
llvm-svn: 87045
2009-11-12 23:52:46 +00:00
Daniel Dunbar
f996c05d74
Add FrontendOptions, and starting moving clang-cc to it.
...
llvm-svn: 87044
2009-11-12 23:52:32 +00:00
Mike Stump
2b34bc5a96
Refine which vtbl is refernced in VTTs.
...
llvm-svn: 87043
2009-11-12 23:36:21 +00:00
Owen Anderson
e96b2111b1
Re-enable this code, since redundant PHIs are now being better nuked.
...
llvm-svn: 87042
2009-11-12 23:22:41 +00:00
Mike Stump
ca0de33113
Refine offsets into vtables for the VTT.
...
llvm-svn: 87041
2009-11-12 23:14:15 +00:00
Bill Wendling
c781d7a072
Simplify code a bit
...
llvm-svn: 87040
2009-11-12 23:13:08 +00:00
Mike Stump
8677bc27bf
Refine vtable pointers for secondary vtables inside VTTs to point to
...
the right base vtable. WIP.
llvm-svn: 87039
2009-11-12 22:56:32 +00:00
Douglas Gregor
9533e2803f
We need the definition of NamedDecl in DeclContextInternals.h, since Clang is type-checking the template definition more thoroughly
...
llvm-svn: 87037
2009-11-12 22:12:17 +00:00
Bill Wendling
e412064c4c
Refactor code that checks if it's a call to a "nounwind" function.
...
llvm-svn: 87036
2009-11-12 21:59:20 +00:00
Chris Lattner
5c89f4b4ef
use isInstructionTriviallyDead, as pointed out by Duncan
...
llvm-svn: 87035
2009-11-12 21:58:18 +00:00
David Greene
033d65581d
Do some cleanups suggested by Chris.
...
llvm-svn: 87034
2009-11-12 21:49:55 +00:00
Daniel Dunbar
5fb4e7553c
StringRef(const char*) should not be used to turn null pointers into empty
...
strings.
llvm-svn: 87031
2009-11-12 21:26:11 +00:00
David Greene
7cf326aed4
Set the ReloadReuse AsmPrinter flag where appropriate.
...
llvm-svn: 87030
2009-11-12 21:07:54 +00:00
Daniel Dunbar
c71bf467d5
Remove my Value.h build fix.
...
llvm-svn: 87029
2009-11-12 21:07:02 +00:00
David Greene
f3ecd97cd8
Fix a build error by providing a missing enum value.
...
llvm-svn: 87028
2009-11-12 21:04:19 +00:00
David Greene
be851acfb0
Make the MachineFunction argument of getFrameRegister const.
...
This also fixes a build error.
llvm-svn: 87027
2009-11-12 21:00:03 +00:00
David Greene
70fdd57dc1
Add hasLoadFromStackSlot and hasStoreToStackSlot to return whether a
...
machine instruction loads or stores from/to a stack slot. Unlike
isLoadFromStackSlot and isStoreFromStackSlot, the instruction may be
something other than a pure load/store (e.g. it may be an arithmetic
operation with a memory operand). This helps AsmPrinter determine when
to print a spill/reload comment.
This is only a hint since we may not be able to figure this out in all
cases. As such, it should not be relied upon for correctness.
Implement for X86. Return false by default for other architectures.
llvm-svn: 87026
2009-11-12 20:55:29 +00:00
Daniel Dunbar
22b75873b9
Attempt to unbreak LLVM build, David G. please check.
...
llvm-svn: 87025
2009-11-12 20:53:56 +00:00
Daniel Dunbar
5026bc3a86
Fix -Asserts warning.
...
llvm-svn: 87024
2009-11-12 20:53:43 +00:00
Bill Wendling
e3ae25b3d8
If there's more than one function operand to a call instruction, be conservative
...
and don't assume that the call doesn't throw. It would be nice if there were a
way to determine which is the callee and which is a parameter. In practice, the
architecture we care about normally only have one operand for a call instruction
(x86 and arm).
llvm-svn: 87023
2009-11-12 20:51:53 +00:00