Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Refine non-virtual part of the this adjustment for thunks. Refine | Mike Stump | 2009-10-15 | 1 | -15/+56 | |
| | | | | | | | non-virtual part of the return result adjustments for covariant thunks. WIP. llvm-svn: 84178 | |||||
* | Track the offset to the current virtual base in CurrentVBaseOffset. | Mike Stump | 2009-10-15 | 1 | -21/+35 | |
| | | | | | | Track path information completely to ensure we get all the overrides. WIP. llvm-svn: 84166 | |||||
* | Handle | Anders Carlsson | 2009-10-15 | 1 | -3/+45 | |
| | | | | | | | | | | | | | struct A { }; struct B : A { }; void f() { const A& a = B(); } correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope). llvm-svn: 84162 | |||||
* | Fix a thinko that John pointed out | Douglas Gregor | 2009-10-14 | 1 | -3/+1 | |
| | | | | llvm-svn: 84142 | |||||
* | Give explicit and implicit instantiations of static data members of | Douglas Gregor | 2009-10-14 | 1 | -3/+42 | |
| | | | | | | | | class templates the proper linkage. Daniel, please look over the CodeGenModule bits. llvm-svn: 84140 | |||||
* | Shift the vcall slots for non-virtual bases of a virtual base, up into | Mike Stump | 2009-10-14 | 1 | -6/+34 | |
| | | | | | | | | the virtual base so they can be reused properly. Don't reuse vcall slots across a virtual boundary. WIP. I have a testcase, but there are still things that need to be fixed before the testcase can go in. llvm-svn: 84120 | |||||
* | Copy metadata associated with CI | Devang Patel | 2009-10-14 | 1 | -0/+4 | |
| | | | | llvm-svn: 84114 | |||||
* | There is now only one version of eh.selector and eh.typeid.for. | Duncan Sands | 2009-10-14 | 2 | -17/+12 | |
| | | | | | | Fix the clang build. llvm-svn: 84107 | |||||
* | Few targets like PIC16 mangle the names of global variables, so retrieve the ↵ | Sanjiv Gupta | 2009-10-14 | 1 | -1/+1 | |
| | | | | | | | | name from Var itself rather than the decl for DebugInfo metadata. llvm-svn: 84102 | |||||
* | fix some cfstring related issues: | Chris Lattner | 2009-10-14 | 1 | -13/+10 | |
| | | | | | | | | | | | | | 1) -fwritable-string does affect the non-utf16 version of cfstrings just not the utf16 ones. 2) utf16 strings should always be marked constant, as the __TEXT segment is readonly. 3) The name of the global doesn't matter, remove it from TargetInfo. 4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now. This fixes rdar://7115750 llvm-svn: 84077 | |||||
* | unbreak test/CodeGen/builtins.c, reverting Devang's change. | Chris Lattner | 2009-10-14 | 1 | -2/+2 | |
| | | | | llvm-svn: 84075 | |||||
* | Check void type before using replaceAllUsesWith(). | Devang Patel | 2009-10-13 | 1 | -1/+2 | |
| | | | | llvm-svn: 84050 | |||||
* | Refine handling for non-virtual bases in return value adjustments for | Mike Stump | 2009-10-13 | 2 | -14/+30 | |
| | | | | | | covariant thunks. WIP. llvm-svn: 84046 | |||||
* | fix test/CodeGen/statements.c on 32-bit hosts. | Chris Lattner | 2009-10-13 | 1 | -1/+12 | |
| | | | | llvm-svn: 84039 | |||||
* | Ensure we sign extend. | Mike Stump | 2009-10-13 | 1 | -2/+2 | |
| | | | | llvm-svn: 84031 | |||||
* | Don't assume that the LHS and RHS of a member pointer expression is a ↵ | Anders Carlsson | 2009-10-13 | 1 | -5/+6 | |
| | | | | | | DeclRefExpr. Fixes PR5177. llvm-svn: 83986 | |||||
* | Remove FIXME. We construct VBIndex very early, before any calls to ↵ | Mike Stump | 2009-10-13 | 1 | -1/+0 | |
| | | | | | | OverrideMethod. llvm-svn: 83981 | |||||
* | Remove extra white space line. | Devang Patel | 2009-10-13 | 1 | -1/+0 | |
| | | | | llvm-svn: 83979 | |||||
* | Do not check use_empty() before invoking replaceAllUsesWith(). | Devang Patel | 2009-10-13 | 1 | -2/+3 | |
| | | | | | | Let replaceAllUsesWith() adjust VHs even though there are no uses. llvm-svn: 83978 | |||||
* | Refine handling for return value conversions with respect to virtual | Mike Stump | 2009-10-13 | 1 | -12/+22 | |
| | | | | | | offsets for covariant thunks. llvm-svn: 83965 | |||||
* | Simplify pointer creation with the new Type::getInt*Ptr methods. | Benjamin Kramer | 2009-10-13 | 13 | -57/+33 | |
| | | | | llvm-svn: 83964 | |||||
* | Teach sema and codegen about the difference between address of labels, | Chris Lattner | 2009-10-13 | 1 | -1/+22 | |
| | | | | | | | | | | which is a common idiom to improve PIC'ness of code using the addr of label extension. This implementation is a gross hack, but the only other alternative would be to teach evalutate about this horrid combination. While GCC allows things like "&&foo - &&bar + 1", people don't use this in practice. This implements PR5131. llvm-svn: 83957 | |||||
* | reimplement codegen for indirect goto with the following advantages: | Chris Lattner | 2009-10-13 | 3 | -44/+91 | |
| | | | | | | | | | | | | | 1. CGF now has fewer bytes of state (one pointer instead of a vector). 2. The generated code is determinstic, instead of getting labels in 'map order' based on pointer addresses. 3. Clang now emits one 'indirect goto switch' for each function, instead of one for each indirect goto. This fixes an M*N = N^2 IR size issue when there are lots of address-taken labels and lots of indirect gotos. 4. This also makes the default cause do something useful, reducing the size of the jump table needed (by one). llvm-svn: 83952 | |||||
* | number address-taken labels from 1. This allows 0 to be used as a sentinel | Chris Lattner | 2009-10-13 | 1 | -1/+1 | |
| | | | | | | | for a null pointer. In other words, "&&foo != NULL" will always work out to true. llvm-svn: 83948 | |||||
* | Use the new Type::getInt8PtrTy method. This should probably be used in a lot | Chris Lattner | 2009-10-13 | 1 | -1/+1 | |
| | | | | | | more places in clang codegen now. llvm-svn: 83947 | |||||
* | Enable "debug info attached to an instruction" mode. | Devang Patel | 2009-10-12 | 1 | -0/+2 | |
| | | | | llvm-svn: 83928 | |||||
* | There is no need to attach debug location info with alloca instruction. | Devang Patel | 2009-10-12 | 1 | -5/+1 | |
| | | | | llvm-svn: 83913 | |||||
* | Encode long double. | Devang Patel | 2009-10-12 | 1 | -0/+1 | |
| | | | | llvm-svn: 83912 | |||||
* | Store the key function of a record decl inside CGRecordLayout. | Anders Carlsson | 2009-10-12 | 2 | -3/+41 | |
| | | | | llvm-svn: 83900 | |||||
* | Even more devirtualization cleverness. | Anders Carlsson | 2009-10-12 | 1 | -1/+5 | |
| | | | | llvm-svn: 83886 | |||||
* | More devirtualization improvements. | Anders Carlsson | 2009-10-12 | 1 | -0/+4 | |
| | | | | llvm-svn: 83883 | |||||
* | Devirtualize calls on temporaries. A().f() for example. | Anders Carlsson | 2009-10-12 | 1 | -0/+6 | |
| | | | | llvm-svn: 83882 | |||||
* | Factor out devirtualization checking into a separate function and make it ↵ | Anders Carlsson | 2009-10-12 | 1 | -1/+15 | |
| | | | | | | handle references correctly. llvm-svn: 83880 | |||||
* | If the base type of a member call is a record type we don't need to emit a ↵ | Anders Carlsson | 2009-10-11 | 1 | -5/+6 | |
| | | | | | | virtual call. llvm-svn: 83816 | |||||
* | Remove dead variable. | Benjamin Kramer | 2009-10-11 | 1 | -1/+1 | |
| | | | | llvm-svn: 83808 | |||||
* | Add CGVtable.cpp to CMakeLists. | Benjamin Kramer | 2009-10-11 | 1 | -0/+1 | |
| | | | | llvm-svn: 83800 | |||||
* | Move the vtable builder to CGVtable.cpp, general cleanup. | Anders Carlsson | 2009-10-11 | 7 | -554/+608 | |
| | | | | llvm-svn: 83798 | |||||
* | Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of ↵ | Anders Carlsson | 2009-10-11 | 4 | -17/+17 | |
| | | | | | | QualTypes. llvm-svn: 83793 | |||||
* | Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality ↵ | Anders Carlsson | 2009-10-10 | 3 | -32/+49 | |
| | | | | | | change. llvm-svn: 83732 | |||||
* | Generate weak read barriers when reading a weak __block | Fariborz Jahanian | 2009-10-10 | 1 | -1/+5 | |
| | | | | | | variable inside the block. llvm-svn: 83729 | |||||
* | Revert 83567. | Devang Patel | 2009-10-09 | 1 | -6/+3 | |
| | | | | llvm-svn: 83676 | |||||
* | Allow customization for the producer information in the debug output. | Mike Stump | 2009-10-09 | 2 | -1/+8 | |
| | | | | llvm-svn: 83659 | |||||
* | Avoid warning. | Mike Stump | 2009-10-09 | 1 | -1/+1 | |
| | | | | llvm-svn: 83609 | |||||
* | Installation of Clang libraries and headers, from Axel Naumann! | Douglas Gregor | 2009-10-08 | 1 | -3/+0 | |
| | | | | llvm-svn: 83582 | |||||
* | Record location info before emiting alloca for arguments. This allows ↵ | Devang Patel | 2009-10-08 | 1 | -3/+6 | |
| | | | | | | arguments to have proper location info. llvm-svn: 83567 | |||||
* | If a global initializer has a non-trivial constructor or destructor, we ↵ | Anders Carlsson | 2009-10-08 | 1 | -0/+11 | |
| | | | | | | | | | | | | | | | | | | | never want to defer generation of it, even if it is declared static. With this change we're finally able to compile and run the (infamous) #include <string> #include <iostream> int main(int argc, char **argv) { std::cout << "Hello, World" << std::endl; } $ clang hello.cpp -lstdc++ -o hello $ ./hello Hello, World llvm-svn: 83559 | |||||
* | Mangle std::basic_ostream<char, std::char_traits<char>> as So. | Anders Carlsson | 2009-10-08 | 1 | -0/+18 | |
| | | | | llvm-svn: 83557 | |||||
* | Mangle anonymous structs/unions correctly. Fixes PR5139. | Anders Carlsson | 2009-10-07 | 2 | -3/+45 | |
| | | | | llvm-svn: 83448 | |||||
* | Add a MangleContext and pass it to all mangle functions. It will be used for ↵ | Anders Carlsson | 2009-10-07 | 5 | -42/+58 | |
| | | | | | | keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. llvm-svn: 83442 | |||||
* | Uncomment some commented out code. | Anders Carlsson | 2009-10-06 | 1 | -4/+4 | |
| | | | | llvm-svn: 83428 |