summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Avoid generating temp in source directoryDaniel Dunbar2009-05-141-1/+1
| | | | llvm-svn: 71776
* ABI handling: Fix invalid assertion, it is possible for a validDaniel Dunbar2009-05-132-4/+10
| | | | | | | | 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
* implement __sync_synchronize and __sync_lock_release,Chris Lattner2009-05-131-0/+6
| | | | | | rdar://6880573 llvm-svn: 71637
* implement l-value codegen of comma exprChris Lattner2009-05-121-0/+12
| | | | llvm-svn: 71595
* Darwin x86-32 ABI: Now that structure passing is farther along, weDaniel Dunbar2009-05-121-0/+3
| | | | | | don't need special treatment for unions. llvm-svn: 71559
* x86-64 ABI: clang incorrectly passes union { long double, float } inDaniel Dunbar2009-05-121-0/+3
| | | | | | | register. - Merge algorithm was returning MEMORY as it should. llvm-svn: 71556
* Darwin x86-32: Multi-dimensional arrays were not handled correctly,Daniel Dunbar2009-05-111-0/+6
| | | | | | spotted by Eli! llvm-svn: 71490
* Make cleanup-stack.c test stronger, and work in release-asserts mode.Daniel Dunbar2009-05-111-11/+21
| | | | llvm-svn: 71484
* Darwin x86_32: Treat records with unnamed bit-fields as "empty".Daniel Dunbar2009-05-111-0/+6
| | | | llvm-svn: 71461
* force a target triple so that the right greppable output happens.Chris Lattner2009-05-091-1/+1
| | | | llvm-svn: 71361
* x86_64 ABI: Ignore padding bit-fields during classification.Daniel Dunbar2009-05-081-1/+10
| | | | | | | - {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-0/+6
| | | | | | | | | 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-0/+3
| | | | | | element" structures. llvm-svn: 71266
* Darwin x86_32: Improve bit-field handling for returning records.Daniel Dunbar2009-05-081-10/+11
| | | | | | | - 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-3/+6
| | | | | | | - This eliminates 5/1000 failures on return-types-32, on the current ABITest config. llvm-svn: 71250
* Fix the atomics sema code to convert operands to the argument typesChris Lattner2009-05-081-1/+4
| | | | | | | | | of the underlying _N builtin, not the the type of the pointee of the actual type. This ensures that atomics involving pointers end up using the correct integer type when they are resolved, avoiding aborts in codegen. llvm-svn: 71218
* reimplement __sync_* builtins to be variadic and to follow the sameChris Lattner2009-05-081-8/+9
| | | | | | | | | 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
* Fix crash with constant initialization of bit-fields in unions.Eli Friedman2009-05-071-0/+2
| | | | llvm-svn: 71194
* Improve handling of (X86) target features.Daniel Dunbar2009-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | - This is a WIP... - This adds -march= handling to the driver, and fixes the defaulting of -mcpu on Darwin (which was using the wrong test). Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as -target-feature [+-]name In clang-cc, communicate with the (clang) target to discover the legal features of a target, and the features which are enabled based on -mcpu. This is currently hardcoded just enough to not be a feature regression, we need to get this information from the backend's TableGen information somehow. This is used to construct the full list of features which are being used, which is in turn used to initialize the predefines. llvm-svn: 71061
* When defining a function whose type has no prototype, make an effortChris Lattner2009-05-052-1/+20
| | | | | | | | 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
* PR4143: don't crash generating debug info for incomplete enum types.Eli Friedman2009-05-041-0/+7
| | | | llvm-svn: 70825
* PR4134: Implement __builtin_extract_return_addr.Eli Friedman2009-05-031-0/+1
| | | | llvm-svn: 70794
* PR4133: fix always_inline implementation to be consistent with gcc.Eli Friedman2009-05-031-2/+1
| | | | llvm-svn: 70786
* look at the right operand when increasing the size of an asm output,Chris Lattner2009-05-031-0/+13
| | | | | | this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20 llvm-svn: 70685
* allow references to the larger value in a tied constraintChris Lattner2009-05-031-1/+12
| | | | | | from the asm string, but reject references to the smaller one. llvm-svn: 70679
* add support for tying asm operands where the result is smaller thanChris Lattner2009-05-031-1/+8
| | | | | | the input. This is part of PR3373. llvm-svn: 70677
* Remove typoDaniel Dunbar2009-05-031-1/+1
| | | | llvm-svn: 70676
* implement support for asm outputs targetting non-simple lvalue destinationsChris Lattner2009-05-031-0/+11
| | | | | | like bitfields. incidentally llvm-gcc crashes on this sort of thing also. :) llvm-svn: 70675
* handle codegen of asms where a small input is tied to a large output.Chris Lattner2009-05-031-1/+11
| | | | llvm-svn: 70672
* Implement bit-field promotion rules for C99. Fixes PR3500.Douglas Gregor2009-05-011-0/+19
| | | | llvm-svn: 70571
* Add testcase that illustrates the problem from r69699 regarding tentative ↵Douglas Gregor2009-05-011-0/+6
| | | | | | definitions of statics llvm-svn: 70543
* Don't assert when we think we need copy/dispose, but don't need them.Mike Stump2009-05-011-0/+4
| | | | | | Radar 6838889 llvm-svn: 70525
* Don't use indirect memory destinations for inline asm. Fixes 6841383.Anders Carlsson2009-05-011-0/+10
| | | | llvm-svn: 70523
* Fix for PR4108: be a bit looser with the casts that we accept in Eli Friedman2009-04-301-0/+5
| | | | | | constant initializers. llvm-svn: 70483
* only support int128_t on 64-bit and larger targets. 32-bit targets don'tChris Lattner2009-04-301-1/+1
| | | | | | have support for __divti3 and friends. llvm-svn: 70480
* initial support for __[u]int128_t, which should be basicallyChris Lattner2009-04-301-0/+18
| | | | | | | | compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. llvm-svn: 70464
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-281-2/+23
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* x86-32 ABI: Fix crash on return of structure with flexible arrayDaniel Dunbar2009-04-271-0/+3
| | | | | | | | member. Also, spell bitfield more consistently as bit-field. llvm-svn: 70220
* When calling the cleanup function specified by __attribute__((cleanup)), ↵Anders Carlsson2009-04-261-0/+8
| | | | | | make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>. llvm-svn: 70098
* fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue Chris Lattner2009-04-251-0/+5
| | | | llvm-svn: 70067
* Fix handling of C99 "extern inline" semantics when dealing withDouglas Gregor2009-04-231-0/+18
| | | | | | | multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. llvm-svn: 69905
* Handle corner case where clang-cc is invoked directly to compile ↵Devang Patel2009-04-231-0/+20
| | | | | | | | preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file. This patch takes conservative approach by not emitting more then one compile unit with isMain bit set. llvm-svn: 69902
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-221-1/+9
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* fix PR4026: Clang can't codegen __func__ without implicit castChris Lattner2009-04-211-0/+5
| | | | llvm-svn: 69747
* use of predefined identifiers like __func__ at global scope warn in sema,Chris Lattner2009-04-211-0/+6
| | | | | | | but crashed codegen. Fix this to report the name of the llvm function. This fixes rdar://6808051 llvm-svn: 69658
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-1/+1
| | | | | | PR4023 llvm-svn: 69618
* Add test case to check line number in debug info.Devang Patel2009-04-201-0/+5
| | | | llvm-svn: 69617
* PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and Eli Friedman2009-04-201-1/+13
| | | | | | subsequently crashed). llvm-svn: 69567
* PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.Eli Friedman2009-04-201-0/+7
| | | | | | Adapted from patch by Tim Northover. llvm-svn: 69566
OpenPOWER on IntegriCloud