- Feb 07, 2009
-
-
Ted Kremenek authored
llvm-svn: 63998
-
Ted Kremenek authored
- 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
-
Dale Johannesen authored
llvm-svn: 63996
-
Dale Johannesen authored
llvm-svn: 63995
-
Evan Cheng authored
Don't sink the instruction if TargetRegisterInfo::isSafeToMoveRegClassDefs doesn't think it's safe. This works around PR1911. llvm-svn: 63994
-
Dale Johannesen authored
llvm-svn: 63993
-
Dale Johannesen authored
Many targets build placeholder nodes for special operands, e.g. GlobalBaseReg on X86 and PPC for the PIC base. There's no sensible way to associate debug info with these. I've left them built with getNode calls with explicit DebugLoc::getUnknownLoc operands. I'm not too happy about this but don't see a good improvement; I considered adding a getPseudoOperand or something, but it seems to me that'll just make it harder to read. llvm-svn: 63992
-
Ted Kremenek authored
GRExprEngine: When processing compound assignments, do a switch table lookup to get the non-compound opcode from the compound opcode instead of relying on the order of BinaryOperator::opcode values. This unbreaks the misc-ps.c test. llvm-svn: 63991
-
Chris Lattner authored
llvm-svn: 63990
-
Dan Gohman authored
llvm-svn: 63989
-
Dan Gohman authored
llvm-svn: 63988
-
Sebastian Redl authored
llvm-svn: 63987
-
Daniel Dunbar authored
non-empty. llvm-svn: 63986
-
Sebastian Redl authored
llvm-svn: 63985
-
Chris Lattner authored
long instead of int. This is because system heaers like to redefine typedefs and that is an error if they don't exactly match. Use long for intptr_t on all systems where long is the right size. llvm-svn: 63984
-
Sebastian Redl authored
llvm-svn: 63983
-
Sebastian Redl authored
llvm-svn: 63982
-
Fariborz Jahanian authored
Now we can say 'hello world' objective-c style in the nonfragile abi. llvm-svn: 63981
-
Chris Lattner authored
don't typecast CHAR_MIN to char, this makes it not a PP constant and gives it the wrong unpromoted type. Thanks to Sebastian for pointing this out! llvm-svn: 63980
-
Bill Wendling authored
llvm-svn: 63979
-
Dale Johannesen authored
getCALLSEQ_{END,START} to permit passing no DebugLoc there. UNDEF doesn't logically have DebugLoc; add getUNDEF to encapsulate this. llvm-svn: 63978
-
- Feb 06, 2009
-
-
Chris Lattner authored
llvm-svn: 63977
-
Chris Lattner authored
in a gcc 4.5 compatible way so that stdint.h can follow the compiler's notion of types. llvm-svn: 63976
-
Douglas Gregor authored
llvm-svn: 63975
-
Douglas Gregor authored
redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
-
Dale Johannesen authored
llvm-svn: 63971
-
Dale Johannesen authored
llvm-svn: 63969
-
Bill Wendling authored
A simple test program shows that debugging works. :-) llvm-svn: 63968
-
Bill Wendling authored
llvm-svn: 63967
-
Bill Wendling authored
llvm-svn: 63966
-
Dan Gohman authored
that already hold the lock can call an entry point that doesn't re-acquire the lock. llvm-svn: 63965
-
Dan Gohman authored
llvm-svn: 63963
-
Dan Gohman authored
addresses to symbols. llvm-svn: 63962
-
Ted Kremenek authored
llvm-svn: 63961
-
Fariborz Jahanian authored
llvm-svn: 63959
-
Ted Kremenek authored
ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
-
Ted Kremenek authored
Add sub-testcase where we process Cocoa.h using --disable-free (i.e., test the usage of the BumpPtrAllocator in ASTContext). llvm-svn: 63957
-
Ted Kremenek authored
Deallocate() methods now take a 'const void*' instead of a 'void *', matching observed behavior with how 'delete[]' can be used. llvm-svn: 63956
-
Daniel Dunbar authored
llvm-svn: 63955
-
Daniel Dunbar authored
-dynamiclib. Re-audited translations to make sure I didn't miss something else. llvm-svn: 63953
-