Anders Carlsson
723f55d697
Improve Sema of the cleanup attribute somewhat.
...
llvm-svn: 64047
2009-02-07 23:16:50 +00:00
Mike Stump
0509d9635b
Ensure we track all the stack depths for all break and continue points
...
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.
llvm-svn: 64046
2009-02-07 23:02:10 +00:00
Ted Kremenek
394dfeb37b
Update test case.
...
llvm-svn: 64045
2009-02-07 22:55:48 +00:00
Ted Kremenek
eae2a0eb8f
Fix null dereference.
...
llvm-svn: 64044
2009-02-07 22:54:59 +00:00
Anders Carlsson
15cb75a20c
Add plumbing for the cleanup stack.
...
llvm-svn: 64043
2009-02-07 22:53:43 +00:00
Ted Kremenek
0aadcd4179
Commit header.
...
llvm-svn: 64042
2009-02-07 22:46:46 +00:00
Ted Kremenek
2a4028b728
For retain/release leaks, have the BugReport description indicate the allocation site and initial bindings.
...
llvm-svn: 64041
2009-02-07 22:38:00 +00:00
Chris Lattner
d8f0786c31
Add missing break statements, fixing PR3503.
...
llvm-svn: 64040
2009-02-07 22:37:06 +00:00
Ted Kremenek
79f955bfed
Tidy up bug descriptions.
...
llvm-svn: 64039
2009-02-07 22:37:02 +00:00
Ted Kremenek
252b90ece6
Use BugReport::getDescription() for the compiler warning text.
...
llvm-svn: 64038
2009-02-07 22:36:41 +00:00
Chris Lattner
4293c8935a
C++ really shouldn't check these #defines, thanks to Howard
...
for pointing this out!
llvm-svn: 64037
2009-02-07 22:21:31 +00:00
Ted Kremenek
008242f6ea
Determining the allocation site for a leak when constructing a CFRefLeakReport. This avoids repeated calls to GetAllocationSite when Profiling a CFRefLeakReport object.
...
llvm-svn: 64036
2009-02-07 22:19:59 +00:00
Mon P Wang
21eb52a74f
Instrcombine should not change load(cast p) to cast(load p) if the cast
...
changes the address space of the pointer.
llvm-svn: 64035
2009-02-07 22:19:29 +00:00
Ted Kremenek
14036554d2
Split logic for 'getEndPath()' for CFRefReport and CFRefLeakReport.
...
llvm-svn: 64034
2009-02-07 22:04:05 +00:00
Ted Kremenek
da545836f0
Convert a use of 'std::ostringstream' to 'llvm::raw_string_ostream'.
...
llvm-svn: 64033
2009-02-07 21:59:45 +00:00
Anders Carlsson
bf8a1be33c
Split the exception object out into its own stack.
...
llvm-svn: 64032
2009-02-07 21:37:21 +00:00
Anders Carlsson
da0e4560a1
Simplify the Objective-C exception handling.
...
llvm-svn: 64031
2009-02-07 21:26:04 +00:00
Mike Stump
56d2a15829
Format for 80-cols.
...
llvm-svn: 64030
2009-02-07 20:14:12 +00:00
Sebastian Redl
5822f08cd6
Move CheckPointerToMemberOperands to SemaExprCXX.cpp
...
llvm-svn: 64029
2009-02-07 20:10:22 +00:00
Mike Stump
6d8a617474
Ensure that we don't miscodegen if vlas creap into the top of the for.
...
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.
llvm-svn: 64028
2009-02-07 20:09:00 +00:00
Sebastian Redl
7b7cec6895
Fix pretty-printing of if conditions. Patch by Ben Lickly.
...
llvm-svn: 64027
2009-02-07 20:05:48 +00:00
Dale Johannesen
9c310711bb
Use getDebugLoc forwarder instead of getNode()->getDebugLoc.
...
No functional change.
llvm-svn: 64026
2009-02-07 19:59:05 +00:00
Sebastian Redl
2175b6a767
Make one expected-diag directive match exactly one actual diagnostic.
...
This uncovers some bugs, so several test cases now fail.
llvm-svn: 64025
2009-02-07 19:52:04 +00:00
Evan Cheng
b87980a042
Revert 64023. make prefers GNUmakefile over makefile.
...
llvm-svn: 64024
2009-02-07 19:38:46 +00:00
Evan Cheng
b443e95b32
Move Apple style build makefiles to the top level. Just like llvmgcc42.
...
llvm-svn: 64023
2009-02-07 19:05:24 +00:00
Chris Lattner
c3aa8f7bab
fix bugpoint url, patch by Pieter de Bie!
...
llvm-svn: 64022
2009-02-07 18:56:30 +00:00
Mike Stump
dc0d6be7b9
Arrange to have the correct StackDepth for while statements.
...
llvm-svn: 64021
2009-02-07 18:08:12 +00:00
Mike Stump
1f8be1b9ac
Fit into 80-col.
...
llvm-svn: 64020
2009-02-07 17:18:33 +00:00
Douglas Gregor
dfa6ee53d7
Add a test case for some Objective-C behavior that will not be supported in Objective-C++
...
llvm-svn: 64019
2009-02-07 17:16:20 +00:00
Dan Gohman
747e55bc9a
Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
...
ScheduleDAG's TLI member to use const.
llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Dan Gohman
e9000829b0
Change several SmallPtrSetImpl members from public to protected,
...
to make the encapsulation more clear.
llvm-svn: 64017
2009-02-07 16:12:23 +00:00
Dan Gohman
1d258405ac
Simplify some code by using blocks_begin(), blocks_end(), and
...
the iterator typedefs instead of handling the std::vector
directly.
llvm-svn: 64016
2009-02-07 16:10:35 +00:00
Sebastian Redl
f3b5e27fee
Make const-initialized const integral variables I-C-Es in C++.
...
llvm-svn: 64015
2009-02-07 13:06:23 +00:00
Mike Stump
1d91dd98ad
Fixup goto codegen in and around VLAs.
...
llvm-svn: 64014
2009-02-07 12:52:26 +00:00
Sebastian Redl
779dd9382d
Fill in C++ status table for section 7 (declarations).
...
llvm-svn: 64013
2009-02-07 12:42:13 +00:00
Chris Lattner
6726d42059
remove two eroneous suffixes, these promote to int. Thanks to Neil
...
for pointing this out.
llvm-svn: 64011
2009-02-07 08:49:37 +00:00
Chris Lattner
04441a10a5
add note, weirdness.
...
llvm-svn: 64010
2009-02-07 07:13:51 +00:00
Chris Lattner
a7cc1267cf
fix some missing parens, thanks for Eli's review!
...
Obviously I make a miserable header developer :)
llvm-svn: 64009
2009-02-07 06:42:04 +00:00
Chris Lattner
14bc3528f5
fix a typo that Sebastian noticed!
...
llvm-svn: 64008
2009-02-07 06:38:41 +00:00
Chris Lattner
5455db4273
make sure that UINTMAX_MAX has an unsigned type. This assumes that
...
uintmax_t is unsigned long long, which is not optimal, but is assumed
elsewhere already.
llvm-svn: 64007
2009-02-07 06:38:06 +00:00
Chris Lattner
6bda45cec0
make various MAX/MIN constants be preprocessor constants, not C constants.
...
Thanks to Eli for pointing this out.
llvm-svn: 64006
2009-02-07 06:33:44 +00:00
Nick Lewycky
ef01e112aa
Add an API for strings with possible NULLs in the middle. Refactor the other
...
two AddString methods to use it.
llvm-svn: 64005
2009-02-07 04:57:08 +00:00
Mike Stump
1f36fb1de0
Ensure that we assert if given an unhandled value.
...
llvm-svn: 64004
2009-02-07 03:46:08 +00:00
Mike Stump
f009a51794
Insert space to avoid warning and make code more readable.
...
llvm-svn: 64003
2009-02-07 03:36:02 +00:00
Nick Lewycky
4ddcc43724
Free the buffer in the case where we don't create a module out of it, as
...
pointed out by Torok Edwin.
Remove trailing whitespaces.
llvm-svn: 64002
2009-02-07 03:15:01 +00:00
Daniel Dunbar
ee9e4c274b
Set load/store alignment when doing ABI coercions.
...
- Currently, this is producing poor code, but we prefer correctness
to performance for now. Eventually we should be able to generally
avoid having to set the alignment when we control the alignment of
the alloca.
- This knocks out 33/1000 failures on my single argument ABI tests,
down to 22/1000 and 18 of these appear to be gcc bugs. Woot.
llvm-svn: 64001
2009-02-07 02:46:03 +00:00
Dale Johannesen
8ba7132128
Make SDNode constructors take a DebugLoc always.
...
Adjust derived classes to pass UnknownLoc where
a DebugLoc does not make sense. Pick one of
DebugLoc and non-DebugLoc variants to survive
for all such classes.
llvm-svn: 64000
2009-02-07 02:15:05 +00:00
Evan Cheng
9571621665
Enable machine sinking pass in non-fast mode.
...
llvm-svn: 63999
2009-02-07 01:57:46 +00:00
Ted Kremenek
0b41d6c43d
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory).
...
llvm-svn: 63998
2009-02-07 01:51:40 +00:00
Ted Kremenek
5a201951ca
Overhaul of Stmt allocation:
...
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).
Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.
Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!
llvm-svn: 63997
2009-02-07 01:47:29 +00:00