summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* static methods don't get this pointers.Chris Lattner2009-05-121-2/+10
| | | | llvm-svn: 71583
* When defining a function whose type has no prototype, make an effortChris Lattner2009-05-051-6/+79
| | | | | | | | to go back and clean up existing uses of the bitcasted function. This is not just an optimization: it is required for correctness to get always inline functions to work, see testcases in function-attributes.c. llvm-svn: 70971
* Refactor global decls to hold either a regular Decl or a CXXConstructorDecl ↵Anders Carlsson2009-05-051-14/+31
| | | | | | + ctor type or a CXXDestructorDecl + dtor type. llvm-svn: 70962
* Fix comment to account for r70786.Eli Friedman2009-05-031-1/+1
| | | | llvm-svn: 70789
* PR4133: fix always_inline implementation to be consistent with gcc.Eli Friedman2009-05-031-2/+1
| | | | llvm-svn: 70786
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-281-2/+10
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Fix handling of C99 "extern inline" semantics when dealing withDouglas Gregor2009-04-231-6/+5
| | | | | | | multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. llvm-svn: 69905
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-4/+5
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* Don't convert interface types (to structs) as part of CodeGenTypes.Daniel Dunbar2009-04-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - This has pros and cons, but for now the pros seem to significantly outway the con. The con is that we will always need to cast in the runtime implementation to a struct type, if we wish to access an interface directly. The pros are: - Avoid the cost of generating types which are used. Most manipulation of Objective-C objects is done through messages, and only the implementation of a class will directly access memory. Previously, we would convert the type even if it only appear as a function parameter, for example. - We don't need to worry about incomplete types, and UpdateCompletedType for interfaces is gone. - It becomes easier to narrow the interface to the shadow struct for Objective-C interfaces (so it can be eliminated). Currently the runtimes still use the CodeGenTypes machinery to generate the LLVM structure they need via ConvertTagDecl, but this can eventually be replaced. llvm-svn: 69797
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-221-16/+13
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* Fix emission of static tentative definitions referenced from other static ↵Douglas Gregor2009-04-211-9/+11
| | | | | | functions llvm-svn: 69699
* Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor2009-04-211-16/+11
| | | | | | | | | | | | | | | tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-1/+1
| | | | | | PR4023 llvm-svn: 69618
* PR3853: Add CodeGen support for __thread.Eli Friedman2009-04-191-5/+3
| | | | llvm-svn: 69545
* silence a warning, it isn't clear what the right answer is here,Chris Lattner2009-04-191-1/+1
| | | | | | will talk to steve. llvm-svn: 69519
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-181-2/+2
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* Add support for generating (very basic) C++ destructors. These aren't called ↵Anders Carlsson2009-04-171-0/+3
| | | | | | by anything yet. llvm-svn: 69343
* Attributes on block functions were not being set.Daniel Dunbar2009-04-171-5/+6
| | | | | | | - <rdar://problem/6800351> clang not producing correct large struct return code for Blocks llvm-svn: 69337
* Ensure that the most recent declaration of a tentative definition winsDaniel Dunbar2009-04-161-3/+5
| | | | | | when generating a common definition. llvm-svn: 69287
* Defer generation of tentative definitions.Daniel Dunbar2009-04-151-31/+37
| | | | | | | | | | | | | | - PR3980. - <rdar://problem/6762287> [irgen] crash when generating tentative definition of incomplete structure - This also avoids creating common definitions for things which are later overwritten. - XFAIL'ed external-defs.c, it isn't completing types properly yet. llvm-svn: 69231
* Start attempting to generate code for C++ ctors.Anders Carlsson2009-04-151-3/+14
| | | | llvm-svn: 69168
* Comment fix.Daniel Dunbar2009-04-141-1/+1
| | | | llvm-svn: 69091
* Fix PR3988: extern inline functions get strong symbol definitions inChris Lattner2009-04-141-24/+22
| | | | | | | | C99 mode. This is a regression from an earlier patch of mine. This also simplifies the linkage enums a bit. llvm-svn: 69069
* implement codegen support for __attribute((__gnuc_inline__)),Chris Lattner2009-04-141-37/+44
| | | | | | | | pulling some attribute munging stuff into GetLinkageForFunction. This should fix PR3986 llvm-svn: 69045
* Refactor how attributes are set on values.Daniel Dunbar2009-04-141-87/+77
| | | | | | | | | | | | | | | | | | | | | | | | - Pull out SetCommonAttributes, which handles the things common to aliases, methods, functions, and variables. - Pull out SetLLVMFunctionAttributesForDefinition, which handles the LLVM attributes which we only want to apply to a definition (like noinline and alwaysinline). - Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes and specialized). - Kill SetFunctionAttributesForDefinition (inlined into sole caller). - Inline SetGVDefinitionAttributes into SetMethodAttributes and specialize. - Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes. This is supposed to be a no functionality change commit, but I may have made a mistake. llvm-svn: 69036
* Split SetGlobalValueAttributes into definition/declaration halves.Daniel Dunbar2009-04-141-35/+37
| | | | | | - No functionality change. llvm-svn: 69035
* Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes toDaniel Dunbar2009-04-141-5/+5
| | | | | | | disambiguate it. - No functionality change. llvm-svn: 69034
* Reduce indentation, no functionality change.Daniel Dunbar2009-04-141-12/+13
| | | | llvm-svn: 69033
* defer emission of always_inline, extern_inline, and inline functions (when Chris Lattner2009-04-141-11/+16
| | | | | | not in c89 mode). llvm-svn: 69032
* give always_inline functions internal linkage. If they cannot be Chris Lattner2009-04-141-1/+3
| | | | | | | inlined for some reason, then we don't want a strong or even weak definition. llvm-svn: 69031
* set the linkage of an inline function according to its language rules.Chris Lattner2009-04-141-2/+26
| | | | llvm-svn: 69030
* Add a comment on SetGlobalValueAttributes.Daniel Dunbar2009-04-141-2/+7
| | | | llvm-svn: 69029
* add a new enum type for linkage, no functionality change.Chris Lattner2009-04-141-15/+26
| | | | llvm-svn: 69028
* Clean up handling of visibility.Daniel Dunbar2009-04-141-85/+43
| | | | llvm-svn: 69027
* reduce indentation, no functionality change.Chris Lattner2009-04-141-27/+23
| | | | llvm-svn: 69026
* do not set visibility on "private" or "available externally" linkage objects.Chris Lattner2009-04-141-2/+2
| | | | llvm-svn: 69025
* Update to use hasAttr() instead of getAttr().Daniel Dunbar2009-04-131-19/+19
| | | | | | - No functionality change. llvm-svn: 68987
* Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).Steve Naroff2009-04-131-4/+1
| | | | llvm-svn: 68982
* Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result ↵Steve Naroff2009-04-131-9/+18
| | | | | | | | == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063. Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline). llvm-svn: 68975
* Internal variables could mistakenly have "hidden" visibility whenDaniel Dunbar2009-04-101-9/+13
| | | | | | | | their emission was deferred. - <rdar://problem/6775234> variables with internal linkage should not be exposed with -fvisibility=hidden. llvm-svn: 68818
* reject codegen of __thread variables as unimplemented, rdar://6775265Chris Lattner2009-04-101-1/+5
| | | | llvm-svn: 68755
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-3/+5
| | | | | | No functionality change (really). llvm-svn: 68726
* Add a destination type argument to EmitConstantExpr. This will be used for ↵Anders Carlsson2009-04-081-1/+1
| | | | | | when the destination has a reference type. (No functionality change yet) llvm-svn: 68593
* Visibility attributes should only be set on definition.Daniel Dunbar2009-04-071-4/+6
| | | | llvm-svn: 68561
* Various fixes to symbols used for Obj-C x86_64 metadata.Daniel Dunbar2009-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | - Changed method names to match gcc (categories names still aren't mangled in). - Expose correct name for class and metadata symbols (although -fvisibility=hidden isn't yet correct). - Remove several things from llvm.used that didn't need to be there (I suspect this can still be trimmed). - Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not needed). - Hide EH type class info with -fvisibility=hidden - Change setGlobal[Option]Visibility to not change the visibility of functions with internal linkage. llvm-svn: 68510
* Add some basic support for generating C++ member functions.Anders Carlsson2009-04-041-12/+21
| | | | llvm-svn: 68425
* Basic support for regparm codegenAnton Korobeynikov2009-04-041-3/+0
| | | | llvm-svn: 68414
* Add a comment/FIXME so Eli can sleep better:-))Steve Naroff2009-04-031-0/+5
| | | | llvm-svn: 68379
* Implement -fvisibility.Fariborz Jahanian2009-04-031-2/+23
| | | | llvm-svn: 68369
* Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar2009-04-031-4/+22
| | | | | | string literals. llvm-svn: 68363
OpenPOWER on IntegriCloud