summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* add support for __sync_nand_and_fetch and __sync_fetch_and_nand,Chris Lattner2009-05-131-2/+20
| | | | | | rdar://6880573 llvm-svn: 71636
* Fix rdar://6880259 - invalid function name in block call ↵Chris Lattner2009-05-131-32/+7
| | | | | | | | (__NSConcreteGlobalBlock2) by using the appropriate CGM interface instead of directly creating a global. llvm-svn: 71617
* implement l-value codegen of comma exprChris Lattner2009-05-121-0/+6
| | | | llvm-svn: 71595
* push GlobalDecl through enough of the CodeGenModule interfacesChris Lattner2009-05-126-69/+68
| | | | | | | | | to allow us to support generation of deferred ctors/dtors. It looks like codegen isn't emitting a call to the dtor in member-functions.cpp:test2, but when it does, its body should get emitted. llvm-svn: 71594
* add an initial stab at emitting deferred c++ inline functions. This handles ↵Chris Lattner2009-05-121-0/+9
| | | | | | | | | static functions and methods declared inline, but not ctors/dtors or methods not declared inline (apparently my previous patch wasn't good enough). llvm-svn: 71591
* cleanups, no functionality change.Chris Lattner2009-05-121-3/+5
| | | | llvm-svn: 71590
* static methods don't get this pointers.Chris Lattner2009-05-121-4/+4
| | | | llvm-svn: 71586
* revert my previous patch, I committed the wrong file.Chris Lattner2009-05-121-10/+2
| | | | llvm-svn: 71585
* static methods don't get this pointers.Chris Lattner2009-05-121-2/+10
| | | | llvm-svn: 71583
* Fixed typos, used DenseSet for keeping track ofFariborz Jahanian2009-05-121-34/+48
| | | | | | | selectors which need use Nonfrgile API for message dispatch. llvm-svn: 71578
* Patch to implement ivar synthesis of properties declared in protocolsFariborz Jahanian2009-05-121-19/+19
| | | | | | only and used in class imllementations (objc2 Nonfragile ABI specific). llvm-svn: 71571
* Darwin x86-32 ABI: Now that structure passing is farther along, weDaniel Dunbar2009-05-121-12/+5
| | | | | | don't need special treatment for unions. llvm-svn: 71559
* x86-64 ABI: clang incorrectly passes union { long double, float } inDaniel Dunbar2009-05-121-1/+2
| | | | | | | register. - Merge algorithm was returning MEMORY as it should. llvm-svn: 71556
* Factor code that's common to EmitCXXMemberCallExpr and ↵Anders Carlsson2009-05-112-27/+41
| | | | | | EmitCXXConstructorCall out into a EmitCXXMemberCall function. llvm-svn: 71514
* Darwin x86-32: Multi-dimensional arrays were not handled correctly,Daniel Dunbar2009-05-111-9/+12
| | | | | | spotted by Eli! llvm-svn: 71490
* Patch to allow Nonfragile ABI to use 32-bit style legacyFariborz Jahanian2009-05-111-105/+220
| | | | | | | | message dispage API for all but a few messages. This is a runtime performance improvement and there is not meant to be a functional change. llvm-svn: 71467
* Darwin x86_32: Treat records with unnamed bit-fields as "empty".Daniel Dunbar2009-05-111-19/+27
| | | | llvm-svn: 71461
* More improvements for GNU runtime objc EH, patch by David Chisnall!Chris Lattner2009-05-111-2/+36
| | | | llvm-svn: 71451
* Implement C++0x nullptr.Sebastian Redl2009-05-101-0/+3
| | | | llvm-svn: 71405
* Correct for renaming PaddedSize -> AllocSize inDuncan Sands2009-05-094-33/+33
| | | | | | LLVM. llvm-svn: 71350
* x86_64 ABI: Ignore padding bit-fields during classification.Daniel Dunbar2009-05-081-2/+5
| | | | | | | - {return-types,single-args}-{32,64} pass the first 1k ABI tests with bit-fields enabled. llvm-svn: 71272
* Darwin x86_32: When coercing a "single element" structure, make sureDaniel Dunbar2009-05-081-4/+8
| | | | | | | | | to use a wide enough type. This might be wider than the "single element"'s type in the presence of padding bit-fields. - Darwin x86_32 now passes the first 1k ABI tests with bit-field generation enabled. llvm-svn: 71270
* Darwin x86_32: Ignore padding bit-fields when looking for "singleDaniel Dunbar2009-05-081-4/+8
| | | | | | element" structures. llvm-svn: 71266
* Darwin x86_32: Improve bit-field handling for returning records.Daniel Dunbar2009-05-081-4/+0
| | | | | | | - This turns out to be a no-op now that most of the handling for everything else is in place. llvm-svn: 71261
* Darwin x86_32: Ignore arrays of empty structures inside records.Daniel Dunbar2009-05-081-0/+7
| | | | | | | - This eliminates 5/1000 failures on return-types-32, on the current ABITest config. llvm-svn: 71250
* further improvements to gnu objc EH stuff, patch by David Chisnall!Chris Lattner2009-05-081-15/+15
| | | | llvm-svn: 71227
* "This patch fixes message sends to super in categories for the GNU runtime. ↵Chris Lattner2009-05-081-17/+31
| | | | | | | | This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes." Patch by David Chisnall! llvm-svn: 71220
* reimplement __sync_* builtins to be variadic and to follow the sameChris Lattner2009-05-081-18/+94
| | | | | | | | | semantic rules that gcc and icc use. This implements the variadic and concrete versions as builtins and has sema do the disambiguation. There are probably a bunch of details to finish up but this seems like a large monotonic step forward :) llvm-svn: 71212
* initial support for ObjC exceptions with the GNU runtime:Chris Lattner2009-05-081-2/+229
| | | | | | | | | | | | | | "This patch is a first pass at adding support for exceptions for the GNU runtime. There are a few limitations at present: - @synchronized() is not yet supported at all. gcc currently emits calls to runtime library functions that don't exist for this directive. - Only id @catch statements are currently working. This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work. - I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed." Patch by David Chisnall! llvm-svn: 71198
* Fix crash with constant initialization of bit-fields in unions.Eli Friedman2009-05-071-1/+1
| | | | llvm-svn: 71194
* Patch to support Gnu runtime's typed selectors.Fariborz Jahanian2009-05-054-15/+72
| | | | | | Patch by David Chisnall. llvm-svn: 71023
* 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
* fix some more cases where we'd emit a file with a line of 0 for implicitChris Lattner2009-05-051-5/+13
| | | | | | | types. In this case, it was objc_selector and objc_class. This fixes rdar://6852754 - clang sometimes generates incorrect/unknown file/line info for DW_TAG__structure_type dies llvm-svn: 70969
* Do not generate bogus location info for DW_TAG_inheritanceChris Lattner2009-05-051-1/+1
| | | | | | | | DIEs. We were generating a loc with line of 0 and a file. These tags do not need locations at all, just remove it. this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies llvm-svn: 70966
* Fix generated debug info for decls with no location (which include self/_cmdChris Lattner2009-05-051-4/+10
| | | | | | | | in ObjC) to not emit file/line location information. Previously we would output a file with bogus line information. This fixes: rdar://6852814 - Clang generates incorrect file & line info for automatic/understood formal parameters for objc-programs llvm-svn: 70965
* Refactor global decls to hold either a regular Decl or a CXXConstructorDecl ↵Anders Carlsson2009-05-053-20/+72
| | | | | | + ctor type or a CXXDestructorDecl + dtor type. llvm-svn: 70962
* Remove an unneeded lookup routine.Daniel Dunbar2009-05-051-35/+7
| | | | llvm-svn: 70951
* Provide basic support for generation of objc2's Fariborz Jahanian2009-05-042-2/+16
| | | | | | | objc_assign_global API when assigning to global objective-c object pointer. llvm-svn: 70939
* Fix the field count in interface record layout (it was incorrectlyDaniel Dunbar2009-05-041-6/+7
| | | | | | | | | | | | compensating for super classes). This was making the reported class sizes for empty classes very, very wrong. - Also, we now report the size info for an empty class like gcc (as the offset of the start, not as 0, 0). - Add a few more test cases we were mishandling before (padding bit field at end of struct, for example). llvm-svn: 70938
* Compute interface instanceStart and instanceSize using the recordDaniel Dunbar2009-05-041-25/+6
| | | | | | | | | layout. - This is much simpler / more efficient. - This also properly computes the size in the presence of bit-fields. llvm-svn: 70916
* "Fix" a problem with debug info in the presence of always_inlineChris Lattner2009-05-041-2/+9
| | | | | | | | | | | | | | | | | | | function calls. For a program like this: #include <stdio.h> static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; } int main() { int X = bar(4); printf("%d\n", X); } clang was not outputing any debug info for the body of main(). This is because the backend is getting confused by the region_start/end that clang is emitting for block scopes. For now, just disable these (matching llvm-gcc), this stuff is in progress of rework anyway. llvm-svn: 70889
* "The attached diff fixes the //FIXME in message send to super. This should ↵Chris Lattner2009-05-041-4/+4
| | | | | | | | now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working)." Patch by David Chisnall! llvm-svn: 70877
* Patch from David Chisnall:Daniel Dunbar2009-05-041-11/+47
| | | | | | | | | The attached diff fixes the //FIXME in message send to super. This should now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working). llvm-svn: 70868
* Remove unnecessary copy of constraint info.Daniel Dunbar2009-05-042-2/+3
| | | | llvm-svn: 70835
* PR4143: don't crash generating debug info for incomplete enum types.Eli Friedman2009-05-041-2/+6
| | | | llvm-svn: 70825
* Remove unnecessary push_back (at least, I think it's unnecessary); Eli Friedman2009-05-041-2/+0
| | | | | | hopefully, this fixes PR4144 without any regressions. llvm-svn: 70823
* Don't allow clients to traverse into superclass synthesized propertiesDaniel Dunbar2009-05-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via CollectObjCIvars. - In places where we need them, we should have the implementation and access the properties through it. This is a fairly substantial functionality change: 1. @encode no longer encodes synthesized ivars, ever. 2. The ivar layout bitmap no longer encodes information for synthesized ivars in superclasses. Well, actually I had already broken that, but it is intentional now. We are now differing substantially from llvm-gcc and gcc here. However, in my opinion this fundamentally *must* work if non-fragile classes are to work. Without this change, the result of @encode and the ivar layout depend on the order that the implementation is seen in a file (if it is in the same file with its superclass). Since both scenarios should work the same, our behavior is now consistent with gcc behavior as if an implementation is never seen following an implementation of its superclass. Note that #2 is only a functionality change when (A) an implementation appears in the same translation unit with the implementation of its superclass, and (B) the superclass has synthesized ivars. My belief is that this situation does not occur in practice. I am not yet sure of the role/semantics of @encode when synthesized ivars are present... it's use is fairly unsound in a non-fragile world. llvm-svn: 70822
* Inline GetFieldBaseOffset into sole callsite.Daniel Dunbar2009-05-031-16/+6
| | | | llvm-svn: 70813
* Avoid recomputing field offsets.Daniel Dunbar2009-05-031-8/+10
| | | | llvm-svn: 70812
* Normalize formattingDaniel Dunbar2009-05-031-28/+13
| | | | llvm-svn: 70810
OpenPOWER on IntegriCloud