summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid superfluous errors regarding variable-length arrays (casts).Daniel Dunbar2008-09-041-2/+3
| | | | llvm-svn: 55759
* Stub out CodeGenFunction::EmitObjCForCollectionStmt.Anders Carlsson2008-08-301-0/+20
| | | | | | Add CodeGenFunction::EmitMemSetToZero and make AggExprEmitter::EmitAggregateClear use it. llvm-svn: 55573
* Objective-C @synthesize support.Daniel Dunbar2008-08-261-8/+12
| | | | | | | | | | | - Only supports simple assignment and atomic semantics are ignored. - Not quite usable yet because the methods do not actually get added to the class metadata. - Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain). - Rearrange CodeGenFunction so synthesis can reuse function prolog / epilog code. llvm-svn: 55365
* Do typechecking and codegen for K&R-style function declarations Eli Friedman2008-08-251-4/+17
| | | | | | | correctly. Not a regression, but made more obvious by my recent fix which made function type compatibility checking a bit more strict. llvm-svn: 55339
* Change WarnUnsupported to ErrorUnsupported (in name and in practice).Daniel Dunbar2008-08-161-3/+3
| | | | | | | - We are beyond the point where this shows up often and when it does generating miscompiled files is bad. llvm-svn: 54836
* More #include cleaningDaniel Dunbar2008-08-111-5/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* More #include cleaningDaniel Dunbar2008-08-111-0/+2
| | | | | | | | - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). llvm-svn: 54629
* More #include cleaningDaniel Dunbar2008-08-111-1/+1
| | | | | | - Remove internal uses of AST.h llvm-svn: 54628
* Avoid creating dummy block when no indirect gotos are present.Daniel Dunbar2008-08-041-0/+3
| | | | llvm-svn: 54322
* Add CodeGen support for indirect goto.Daniel Dunbar2008-08-041-1/+34
| | | | | | | | | | - Follows emission scheme used by llvm-gcc, i.e. invent an id for each label whose address is taken and replace each indirect goto by a switch to each possible target. - Currently we emit a switch for each indirect goto instead of merging them as llvm-gcc does. llvm-svn: 54318
* Rework codegen emission of globalsDaniel Dunbar2008-07-291-2/+3
| | | | | | | | | | | | | | | | | | | | - No (intended) functionality change. - Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative definition from those that are the final definition. - Lazy construction is now encapsulated in GetAddrOf{Function,GlobalVar} while final definitions are constructed in EmitGlobal{Function,Var}Definition. - External interface for dealing with globals is now limited to EmitGlobal and GetAddrOf{Function,GlobalVar}. - Also updated helper functions dealing with statics, annotations, and ctors to be private. llvm-svn: 54179
* Fix rdar://6103124, the only dummy blocks are ones without names. Named blocksChris Lattner2008-07-251-1/+1
| | | | | | are important part of control flow structures. llvm-svn: 54078
* Fixed bugzilla bug# 2489.Sanjiv Gupta2008-07-041-0/+20
| | | | | | This was broken when the GenerateCode function was splitted to use GenerateFunction. llvm-svn: 53136
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-171-133/+20
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* Basic support for volatile loads and stores. Stores the volatile Eli Friedman2008-06-131-0/+2
| | | | | | | | | | qualifier in the lvalue, and changes lvalue loads/stores to honor the volatile flag. Places which need some further attention are marked with FIXMEs. Patch by Cédric Venet. llvm-svn: 52264
* First cut at setting attributes for functions and calls; this puts us Eli Friedman2008-06-011-31/+0
| | | | | | | | | | | | | | | much closer to passing the gcc struct layout tests. It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful. To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this. llvm-svn: 51839
* Support for code generation of Objective-C top-level language constructs.Anton Korobeynikov2008-06-011-5/+16
| | | | | | Implemented by David Chisnall! llvm-svn: 51835
* Generate subprogram debug info with -g.Sanjiv Gupta2008-05-251-10/+9
| | | | | | Also take care of freeing memory at the right places. llvm-svn: 51553
* Make debugging information usable. This is barebones, but it makes -g Eli Friedman2008-05-221-1/+20
| | | | | | | | | | | | | | actually work (instead of crashing llc), and there's enough info emitted to get line number information in gdb. This should hopefully be helpful for debugging non-working programs. I got rid of the begin/endregion calls because the implementation wasn't working; someone who knows the debugging info a bit better might try to add it. I really have no clue how a compiler is supposed to emit them. This commit shouldn't have any effect without -g. llvm-svn: 51404
* Move getAccessedFieldNo out of lib/AST/Expr.cpp intoDan Gohman2008-05-221-1/+1
| | | | | | | | | lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. llvm-svn: 51398
* remove a stray printoutChris Lattner2008-05-061-2/+0
| | | | llvm-svn: 50691
* Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.Chris Lattner2008-05-041-0/+1
| | | | | | | Fix 'swapping' of attributes to not insert null values into the DeclAttrs map. llvm-svn: 50612
* if a decl is both 'static' and weak or static and inline, its linkageChris Lattner2008-05-041-3/+3
| | | | | | type should be internal, not weak/linkonce. llvm-svn: 50611
* Remove FileVarDecl and BlockVarDecl. They are replaced by ↵Steve Naroff2008-04-151-1/+1
| | | | | | | | VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
* tracking API changes arising from r49277Gabor Greif2008-04-061-4/+4
| | | | llvm-svn: 49279
* Codegen assignment to self correctly, patch by David Chisnall!Chris Lattner2008-04-041-2/+17
| | | | llvm-svn: 49201
* simplify some code by using PointerLikeType.Chris Lattner2008-04-021-1/+1
| | | | llvm-svn: 49101
* some cleanups on top of David's patch. There are still twoChris Lattner2008-03-301-6/+6
| | | | | | | | | | | | | remaining open issues I've communicated to him: 1) self can be assigned to, and his patch didn't handle it correctly. 2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses all parent class ivars) and flattens classes. If A derives from B, and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}. David, please review. llvm-svn: 48970
* Add initial support for objc codegen for methods, ivars, and theChris Lattner2008-03-301-2/+79
| | | | | | etoile runtime, patch by David Chisnall! llvm-svn: 48969
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+182
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud