summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Refine non-virtual part of the this adjustment for thunks. RefineMike Stump2009-10-151-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 Stump2009-10-151-21/+35
| | | | | | Track path information completely to ensure we get all the overrides. WIP. llvm-svn: 84166
* HandleAnders Carlsson2009-10-151-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 outDouglas Gregor2009-10-141-3/+1
| | | | llvm-svn: 84142
* Give explicit and implicit instantiations of static data members ofDouglas Gregor2009-10-141-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 intoMike Stump2009-10-141-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 CIDevang Patel2009-10-141-0/+4
| | | | llvm-svn: 84114
* There is now only one version of eh.selector and eh.typeid.for.Duncan Sands2009-10-142-17/+12
| | | | | | Fix the clang build. llvm-svn: 84107
* Few targets like PIC16 mangle the names of global variables, so retrieve the ↵Sanjiv Gupta2009-10-141-1/+1
| | | | | | | | name from Var itself rather than the decl for DebugInfo metadata. llvm-svn: 84102
* fix some cfstring related issues: Chris Lattner2009-10-141-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 Lattner2009-10-141-2/+2
| | | | llvm-svn: 84075
* Check void type before using replaceAllUsesWith().Devang Patel2009-10-131-1/+2
| | | | llvm-svn: 84050
* Refine handling for non-virtual bases in return value adjustments forMike Stump2009-10-132-14/+30
| | | | | | covariant thunks. WIP. llvm-svn: 84046
* fix test/CodeGen/statements.c on 32-bit hosts.Chris Lattner2009-10-131-1/+12
| | | | llvm-svn: 84039
* Ensure we sign extend.Mike Stump2009-10-131-2/+2
| | | | llvm-svn: 84031
* Don't assume that the LHS and RHS of a member pointer expression is a ↵Anders Carlsson2009-10-131-5/+6
| | | | | | DeclRefExpr. Fixes PR5177. llvm-svn: 83986
* Remove FIXME. We construct VBIndex very early, before any calls to ↵Mike Stump2009-10-131-1/+0
| | | | | | OverrideMethod. llvm-svn: 83981
* Remove extra white space line.Devang Patel2009-10-131-1/+0
| | | | llvm-svn: 83979
* Do not check use_empty() before invoking replaceAllUsesWith().Devang Patel2009-10-131-2/+3
| | | | | | Let replaceAllUsesWith() adjust VHs even though there are no uses. llvm-svn: 83978
* Refine handling for return value conversions with respect to virtualMike Stump2009-10-131-12/+22
| | | | | | offsets for covariant thunks. llvm-svn: 83965
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-1313-57/+33
| | | | llvm-svn: 83964
* Teach sema and codegen about the difference between address of labels,Chris Lattner2009-10-131-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 Lattner2009-10-133-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 sentinelChris Lattner2009-10-131-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 lotChris Lattner2009-10-131-1/+1
| | | | | | more places in clang codegen now. llvm-svn: 83947
* Enable "debug info attached to an instruction" mode.Devang Patel2009-10-121-0/+2
| | | | llvm-svn: 83928
* There is no need to attach debug location info with alloca instruction.Devang Patel2009-10-121-5/+1
| | | | llvm-svn: 83913
* Encode long double.Devang Patel2009-10-121-0/+1
| | | | llvm-svn: 83912
* Store the key function of a record decl inside CGRecordLayout.Anders Carlsson2009-10-122-3/+41
| | | | llvm-svn: 83900
* Even more devirtualization cleverness.Anders Carlsson2009-10-121-1/+5
| | | | llvm-svn: 83886
* More devirtualization improvements.Anders Carlsson2009-10-121-0/+4
| | | | llvm-svn: 83883
* Devirtualize calls on temporaries. A().f() for example.Anders Carlsson2009-10-121-0/+6
| | | | llvm-svn: 83882
* Factor out devirtualization checking into a separate function and make it ↵Anders Carlsson2009-10-121-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 Carlsson2009-10-111-5/+6
| | | | | | virtual call. llvm-svn: 83816
* Remove dead variable.Benjamin Kramer2009-10-111-1/+1
| | | | llvm-svn: 83808
* Add CGVtable.cpp to CMakeLists.Benjamin Kramer2009-10-111-0/+1
| | | | llvm-svn: 83800
* Move the vtable builder to CGVtable.cpp, general cleanup.Anders Carlsson2009-10-117-554/+608
| | | | llvm-svn: 83798
* Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of ↵Anders Carlsson2009-10-114-17/+17
| | | | | | QualTypes. llvm-svn: 83793
* Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality ↵Anders Carlsson2009-10-103-32/+49
| | | | | | change. llvm-svn: 83732
* Generate weak read barriers when reading a weak __blockFariborz Jahanian2009-10-101-1/+5
| | | | | | variable inside the block. llvm-svn: 83729
* Revert 83567.Devang Patel2009-10-091-6/+3
| | | | llvm-svn: 83676
* Allow customization for the producer information in the debug output.Mike Stump2009-10-092-1/+8
| | | | llvm-svn: 83659
* Avoid warning.Mike Stump2009-10-091-1/+1
| | | | llvm-svn: 83609
* Installation of Clang libraries and headers, from Axel Naumann!Douglas Gregor2009-10-081-3/+0
| | | | llvm-svn: 83582
* Record location info before emiting alloca for arguments. This allows ↵Devang Patel2009-10-081-3/+6
| | | | | | arguments to have proper location info. llvm-svn: 83567
* If a global initializer has a non-trivial constructor or destructor, we ↵Anders Carlsson2009-10-081-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 Carlsson2009-10-081-0/+18
| | | | llvm-svn: 83557
* Mangle anonymous structs/unions correctly. Fixes PR5139.Anders Carlsson2009-10-072-3/+45
| | | | llvm-svn: 83448
* Add a MangleContext and pass it to all mangle functions. It will be used for ↵Anders Carlsson2009-10-075-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 Carlsson2009-10-061-4/+4
| | | | llvm-svn: 83428
OpenPOWER on IntegriCloud