summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Reflow some comments.Mike Stump2009-05-1613-157/+142
| | | | llvm-svn: 71937
* Classes with "+load" methods need to go in the non-lazy class list (orDaniel Dunbar2009-05-151-10/+40
| | | | | | else the method will not be found by the runtime at class load time). llvm-svn: 71904
* Factor code for adding module-level class lists into separate method.Daniel Dunbar2009-05-151-43/+43
| | | | | | - No functionality change. llvm-svn: 71898
* A C++ member function always has either weak linkage (if it's inline or ↵Anders Carlsson2009-05-151-0/+8
| | | | | | defined inline) or strong linkage (other cases). llvm-svn: 71873
* Name mangling for class template specializations and template arguments.Anders Carlsson2009-05-151-2/+64
| | | | llvm-svn: 71861
* Fixup debug information for the location information for __blockMike Stump2009-05-151-2/+4
| | | | | | | | | | | | | | | | | | | | variables. For this to work, the backend needs to handle more complex forms for locations. A typical utterance would be: %forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1] %0 = load i8** %forwarding ; <i8*> [#uses=1] %1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1] %x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1] %2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1] call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*)) Presently when selection finds something it doesn't understand, it just avoids generating any information, which is safe, just incomplete. Radar 6867696 llvm-svn: 71824
* Skip the asm prefix when storing the name in block info.Daniel Dunbar2009-05-141-2/+6
| | | | | | | | | | | - Otherwise we emit internal names with embedded '\01' characters, which confuses some tools. - Ideally all the code which wants to get a "display name" for the given function should follow one code path, but this should be a monotonic improvement for now. llvm-svn: 71774
* Enhance debug information for block literals. Radar 6867696Mike Stump2009-05-142-2/+135
| | | | llvm-svn: 71763
* We need to specify the "linkage name" to the subprogram now that weDaniel Dunbar2009-05-141-1/+5
| | | | | | | emit the correct "display name". I suspect we need more work here, see FIXME for example. llvm-svn: 71761
* Make sure not to include the LLVM asm prefix in function names forDaniel Dunbar2009-05-131-0/+4
| | | | | | debug info. llvm-svn: 71736
* ABI handling: Fix invalid assertion, it is possible for a validDaniel Dunbar2009-05-131-6/+16
| | | | | | | | coercion to be specified which truncates padding bits. It would be nice to still have the assert, but we don't have any API call for the unpadding size of a type yet. llvm-svn: 71695
* Removed 4-letter :) word in comment.Fariborz Jahanian2009-05-131-8/+8
| | | | | | Used simple array for Selector build. llvm-svn: 71674
* implement __sync_synchronize and __sync_lock_release,Chris Lattner2009-05-131-3/+15
| | | | | | rdar://6880573 llvm-svn: 71637
* 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
OpenPOWER on IntegriCloud