summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
Commit message (Collapse)AuthorAgeFilesLines
...
* tidy up OrderGlobalInitsChris Lattner2010-06-271-13/+11
| | | | llvm-svn: 106976
* Patch to correctly mangle block helper functionsFariborz Jahanian2010-06-241-1/+1
| | | | | | | when block literal is declared inside a ctor/dtor. Fixes radr 8096995. llvm-svn: 106700
* Switch over to the new caching version of getMangledName.Anders Carlsson2010-06-221-1/+0
| | | | llvm-svn: 106549
* Add a new variant of getMangledName that caches the mangling for decls.Anders Carlsson2010-06-221-0/+5
| | | | llvm-svn: 106547
* Per Chris's comment, remove another static (this oneFariborz Jahanian2010-06-221-0/+14
| | | | | | is a static comparator operator). llvm-svn: 106511
* In supporting init-priority, globals with the same init_priority must beFariborz Jahanian2010-06-211-1/+9
| | | | | | emitted in the order in which they are seen (still radar 8076356). llvm-svn: 106485
* IRGen for implementation of init-priority attribute.Fariborz Jahanian2010-06-211-0/+5
| | | | | | | Test case will be checked in llvm test suite. (finishes off radar 8076356). llvm-svn: 106441
* Fix PR7097, a bad interaction between -fno-use-cxa-atexit andChris Lattner2010-06-191-2/+4
| | | | | | -mconstructor-aliases by using a WeakVH instead of a raw pointer. llvm-svn: 106384
* Get rid of getMangledCXXCtorName and getMangledCXXDtorName.Anders Carlsson2010-06-091-6/+0
| | | | llvm-svn: 105673
* Get rid of an unnecessary getMangledName overload.Anders Carlsson2010-06-091-1/+0
| | | | llvm-svn: 105671
* Fix for PR7040: Don't try to compute the LLVM type for a function where itEli Friedman2010-05-301-0/+4
| | | | | | | | | | | isn't possible to compute. This patch is mostly refactoring; the key change is the addition of the code starting with the comment, "Check whether the function has a computable LLVM signature." The solution here is essentially the same as the way the vtable code handles such functions. llvm-svn: 105151
* IRgen: Add a stub class for generating ABI-specific C++ code.Charles Davis2010-05-251-2/+18
| | | | | | | | This class only supports name mangling (which is apparently used during C/ObjC codegen). For now only the Itanium C++ ABI is supported. Patches to add a second C++ ABI are forthcoming. llvm-svn: 104630
* Improve name mangling for blocks and support mangling of static localDouglas Gregor2010-05-251-0/+1
| | | | | | | | | variables within blocks. We loosely follow GCC's mangling, but since these are always internal symbols the names don't really matter. I intend to revisit block mangling later, because GCC's mangling is rather verbose. <rdar://problem/8015719>. llvm-svn: 104610
* If a function definition has any sort of weak linkage, its static localJohn McCall2010-05-251-0/+4
| | | | | | | | | | | | variables should have that linkage. Otherwise, its static local variables should have internal linkage. To avoid computing this excessively, set a function's linkage before we emit code for it. Previously we were assigning weak linkage to the static variables of static inline functions in C++, with predictably terrible results. This fixes that and also gives better linkage than 'weak' when merging is required. llvm-svn: 104581
* Rework when and how vtables are emitted, by tracking where vtables areDouglas Gregor2010-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. llvm-svn: 103718
* Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTIJohn McCall2010-04-301-1/+1
| | | | | | when used by the exceptions routines. Fixes PR 6974. llvm-svn: 102684
* IRGen for initialization/destruction ofFariborz Jahanian2010-04-281-0/+1
| | | | | | | ivar class objects (NeXt runtime). (radar 7900343). llvm-svn: 102533
* Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to ↵Anders Carlsson2010-04-241-4/+1
| | | | | | use the new version. llvm-svn: 102274
* Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.Anders Carlsson2010-04-241-1/+4
| | | | llvm-svn: 102273
* More work toward implementingFariborz Jahanian2010-04-231-0/+4
| | | | | | NeXt's -fno-constant-cfstrings - wip. llvm-svn: 102189
* Support for -fno-constant-cfstrings option - wip.Fariborz Jahanian2010-04-221-0/+4
| | | | llvm-svn: 102112
* Some renaming of methods, fixes typoFariborz Jahanian2010-04-191-2/+2
| | | | | | (related to PR6769). llvm-svn: 101794
* Local static variables must be available module-wiseFariborz Jahanian2010-04-181-0/+9
| | | | | | | as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756
* Vtable -> VTable renames across the board.Anders Carlsson2010-04-171-3/+3
| | | | llvm-svn: 101666
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-081-1/+1
| | | | llvm-svn: 100778
* Unbreak the buildDouglas Gregor2010-04-081-1/+2
| | | | llvm-svn: 100775
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-041-7/+11
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-021-11/+3
| | | | llvm-svn: 100200
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-021-3/+11
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Minor include pruning.Benjamin Kramer2010-03-311-1/+0
| | | | llvm-svn: 100007
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-301-11/+7
| | | | llvm-svn: 99949
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-7/+11
| | | | | | memmove, and memset llvm-svn: 99930
* Remove the old vtable layout code.Anders Carlsson2010-03-301-10/+0
| | | | llvm-svn: 99869
* When given the magic class __cxxabiv1::__fundamental_type_info, produceRafael Espindola2010-03-271-0/+8
| | | | | | | | the typeinfo for the fundamental types. Fixes PR6685. llvm-svn: 99701
* Remove old thunks code.Anders Carlsson2010-03-241-11/+0
| | | | llvm-svn: 99374
* More thunks scaffolding.Anders Carlsson2010-03-231-0/+3
| | | | llvm-svn: 99294
* Rename CGVtableInfo to CodeGenVTables in preparation of adding another ↵Anders Carlsson2010-03-231-3/+3
| | | | | | VTableInfo class. llvm-svn: 99250
* C++: Add support for -fno-use-cxa-atexit.Daniel Dunbar2010-03-201-2/+13
| | | | | | | | - So much typing, so little gain... Also, rename the __cxx_global_initialization function just to match llvm-gcc. llvm-svn: 99039
* Change CodeGenModule to rely on the Module's symbol table instead ofJohn McCall2010-03-191-40/+17
| | | | | | | | | | | | | shadowing it in the GlobalDeclMap. Eliminates the string-uniquing requirement for mangled names, which should help C++ codegen times a little. Forces us to do string lookups instead of pointer lookups, which might hurt codegen times a little across the board. We'll see how it plays out. Removing the string-uniquing requirement implicitly fixes any bugs like PR6635 which arose from the fact that we had multiple uniquing tables for different kinds of identifiers. llvm-svn: 99012
* Give explicit template instantiations weak ODR linkage. FormerDouglas Gregor2010-03-131-1/+2
| | | | | | | | | iterations of this patch gave explicit template instantiation link-once ODR linkage, which permitted the back end to eliminate unused symbols. Weak ODR linkage still requires the symbols to be generated. llvm-svn: 98441
* Re-revert the explicit template instantiation linkage patch. I am beginning ↵Douglas Gregor2010-03-131-2/+1
| | | | | | to look incompetent llvm-svn: 98425
* Reinstate patch to turn explicit template instantiations into weak symbolsDouglas Gregor2010-03-131-1/+2
| | | | llvm-svn: 98424
* Revert the linkage change for explicit template instantiations; something is ↵Douglas Gregor2010-03-121-2/+1
| | | | | | amiss llvm-svn: 98332
* Give explicit template instantiations weak linkage (but don't deferDouglas Gregor2010-03-121-1/+2
| | | | | | them). Fixes PR6578. llvm-svn: 98328
* Delay codegen of vtables when handling implicit instantiations.Rafael Espindola2010-03-101-1/+3
| | | | | | This fixes PR6474. llvm-svn: 98123
* Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),John McCall2010-03-061-0/+1
| | | | | | | and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all). llvm-svn: 97859
* Fix PR6473.Rafael Espindola2010-03-041-0/+9
| | | | | | | | | Clang's support for weakref is now better than llvm-gcc's :-) We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file. llvm-svn: 97733
* Revert changes r97693, r97700, and r97718.John McCall2010-03-041-7/+1
| | | | | | Our testing framework can't deal with disabled targets yet. llvm-svn: 97719
* Create a TargetMachine whenever we create a CodeGenAction. The codegen ofJohn McCall2010-03-041-1/+7
| | | | | | some builtins will rely on target knowledge. llvm-svn: 97693
* Perform two more constructor/destructor code-size optimizations:John McCall2010-02-231-0/+1
| | | | | | | | | | | | | | | | 1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin. 2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported). These are bundled together because I didn't think it worthwhile to split them, not because they really need to be. llvm-svn: 96842
OpenPOWER on IntegriCloud