summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct for change of this name in LLVM.Duncan Sands2009-03-111-2/+2
| | | | llvm-svn: 66652
* Backout r66408, we don't want handling of globals to rely on theDaniel Dunbar2009-03-091-36/+32
| | | | | | | module symbol table. The root problem inspiring this was fixed in r66316 (and again in r66506). llvm-svn: 66512
* Be sure to never create two functions with the same name, instead arrange toMike Stump2009-03-091-32/+36
| | | | | | reuse the prior one. llvm-svn: 66408
* Make constant emission for @encode use the common string emission code. Eli Friedman2009-03-071-6/+2
| | | | | | | This is a bit cleaner, and also "fixes" bad code that compares the addresses of the string constants. llvm-svn: 66346
* Fixup our uses of various linkages to match how llvm now works. I think ↵Mike Stump2009-03-071-5/+5
| | | | | | | | they are all correct, but an extra set of ObjC eyes would be good. llvm-svn: 66342
* (LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and addDaniel Dunbar2009-03-061-20/+34
| | | | | | | | | | | | | | CodeGenModule::CreateRuntimeVariable. - No real functionality change; although we now assert on silly things like: -- int objc_exception_throw; void f0() { @throw(@"A"); } -- instead of accepting it. llvm-svn: 66292
* IRgen support for weak_import.Daniel Dunbar2009-03-061-4/+9
| | | | | | - <rdar://problem/6652110> clang should support weak_import llvm-svn: 66270
* Don't mangle names of local variables.Daniel Dunbar2009-03-051-1/+3
| | | | | | | | - For one thing, this adds unneeded overhead; for another, this routine can be used to emit unnamed decls which we shouldn't try to mangle. llvm-svn: 66212
* Make IRGen compatible with declaring a function with incomplete Eli Friedman2009-03-051-2/+13
| | | | | | | return/argument types. (The generated IR isn't ideal, but we can't really do better in general.) llvm-svn: 66132
* Move more of the blocks code up and out.Mike Stump2009-03-041-1/+1
| | | | llvm-svn: 66046
* Move more of blocks codegen out of CodeGenModule and into theMike Stump2009-03-041-6/+3
| | | | | | | | | BlockModule. No functionality change. This should help people that don't want to know anything about blocks not be confused by the overloaded use of the term block or nor want to see all the blocks goop. llvm-svn: 66042
* Support "asm" renaming of external symbols.Daniel Dunbar2009-03-041-0/+6
| | | | | | - PR3698. llvm-svn: 66038
* Don't set nounwind on functions when in using the new Obj-C ABI.Daniel Dunbar2009-03-021-1/+1
| | | | llvm-svn: 65806
* simplify some code.Chris Lattner2009-03-011-9/+5
| | | | llvm-svn: 65782
* Initialize NSConcreteStackBlockAnders Carlsson2009-03-011-2/+2
| | | | llvm-svn: 65749
* Fix PR3612. We ensure that we add builtins to the GlobalDeclMap andMike Stump2009-02-271-3/+12
| | | | | | | | | we ensure that things added to the module can be found even when they are not in GlobalDeclMap. The later is for increased flexibility, should someone want to do something tricky like extern "Ada" in the same module. llvm-svn: 65657
* Minor cleanup: use getDeclAlignInBytes helper.Eli Friedman2009-02-271-11/+1
| | | | llvm-svn: 65611
* fix some sema problems with wide strings and hook up basic codegen for them.Chris Lattner2009-02-261-7/+5
| | | | llvm-svn: 65582
* first wave of fixes for @encode sema support. This is part of PR3648.Chris Lattner2009-02-241-8/+20
| | | | | | | The big difference here is that (like string literal) @encode has array type, not pointer type. llvm-svn: 65391
* Emit extern_weak when needed.Daniel Dunbar2009-02-211-5/+10
| | | | | | - PR3629. llvm-svn: 65203
* Initialize the Init variable to something reasonable when we emit an Eli Friedman2009-02-201-1/+4
| | | | | | error, so we don't crash. llvm-svn: 65099
* Add irgen support for the noinline attribute.Anders Carlsson2009-02-191-0/+3
| | | | llvm-svn: 65056
* Don't emit K&R unprototyped function definitions as varargs.Daniel Dunbar2009-02-191-13/+27
| | | | | | - <rdar://problem/6584606> clang/x86-64 - too many reg saves llvm-svn: 65032
* Emission of global variable initialializer was broken in rareDaniel Dunbar2009-02-191-1/+23
| | | | | | | | | | | situation where a tentative decl was emitted *after* the actual initialization. This occurs in some rare situations with static decls. - PR3613. - I'm not particularly happy with this fix, but I don't see a simpler or more elegant solution yet. llvm-svn: 65018
* Address Chris's comments regarding C++ name mangling.Douglas Gregor2009-02-181-10/+12
| | | | llvm-svn: 64984
* Add anti-FIXME.Daniel Dunbar2009-02-181-1/+4
| | | | llvm-svn: 64969
* Simplify.Daniel Dunbar2009-02-181-2/+1
| | | | llvm-svn: 64944
* Make it possible for builtins to expression FILE* arguments, so thatDouglas Gregor2009-02-141-1/+4
| | | | | | | | we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. llvm-svn: 64526
* Implicitly declare certain C library functions (malloc, strcpy, memmove,Douglas Gregor2009-02-131-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. llvm-svn: 64504
* Simplify predicate.Daniel Dunbar2009-02-131-3/+1
| | | | llvm-svn: 64500
* IRgen support for attribute used.Daniel Dunbar2009-02-131-7/+19
| | | | | | - PR3566 llvm-svn: 64492
* Pull MayDeferGeneration out of EmitGlobal.Daniel Dunbar2009-02-131-16/+34
| | | | | | | | - Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly llvm-svn: 64488
* Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructureDaniel Dunbar2009-02-131-13/+36
| | | | | | | for attribute used support. - No functionality change. llvm-svn: 64487
* Let the backend unique these.Mike Stump2009-02-131-1/+0
| | | | llvm-svn: 64486
* Move DescriptorUniqueCount into CGM.Mike Stump2009-02-131-0/+1
| | | | llvm-svn: 64481
* Move GlobalUniqueCount up into CGM.Mike Stump2009-02-131-1/+3
| | | | llvm-svn: 64473
* Move GenericBlockLiteralType into CGM.Mike Stump2009-02-131-1/+1
| | | | llvm-svn: 64452
* Move BlockDescriptorType into CGM.Mike Stump2009-02-131-1/+2
| | | | llvm-svn: 64451
* Add basic support for C++ name mangling according to the Itanium C++Douglas Gregor2009-02-131-14/+40
| | | | | | | | | | | | | | | | ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. llvm-svn: 64413
* Add a very basic implemenation of global blocks. This needs to be cleaned up.Anders Carlsson2009-02-121-2/+1
| | | | llvm-svn: 64387
* Support __attribute__(section(<name>))Daniel Dunbar2009-02-121-0/+6
| | | | llvm-svn: 64380
* Use 'compile' instead of 'codegen' when reporting error to user.Daniel Dunbar2009-02-061-2/+2
| | | | llvm-svn: 63952
* Add -femit-all-decls codegen option.Daniel Dunbar2009-02-041-1/+1
| | | | | | | | - Emits all declarations, even unused (static) ones. - Useful when doing minimization of codegen problems (otherwise problems localized to a static function aren't minimized well). llvm-svn: 63776
* Thread CGFunctionInfo construction through CodeGenTypes.Daniel Dunbar2009-02-021-2/+2
| | | | | | - Inefficient & leaks memory currently, will be cleaned up subsequently. llvm-svn: 63567
* More ABI API cleanup.Daniel Dunbar2009-02-021-1/+1
| | | | | | | - Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. llvm-svn: 63553
* Kill off CGCallInfo, always use CGFunctionInfo for encapsulatingDaniel Dunbar2009-01-311-2/+1
| | | | | | function/call info. llvm-svn: 63466
* Use NonFragileABI as name of new Next abi. More comments Fariborz Jahanian2009-01-221-1/+1
| | | | | | for the new meta-data. llvm-svn: 62806
* Refactoring ObjC Next's runtime classes in preparation forFariborz Jahanian2009-01-211-1/+2
| | | | | | the new ObjC's abi. llvm-svn: 62721
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-161-1/+1
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* Bug fix, __private_extern__ globals were always introducing a definition.Daniel Dunbar2009-01-131-10/+31
| | | | llvm-svn: 62139
OpenPOWER on IntegriCloud