summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* When evaluating variably modified types for function parameters, dig out theEli Friedman2012-11-141-1/+10
| | | | | | | | | | type as written from the ParmVarDecl; it's unclear whether the standard (C99 6.9.1p10) requires this, but we're following the precedent set by gcc, and hopefully nobody will ever ask about this again. PR9559 / <rdar://problem/12621983>. llvm-svn: 167985
* The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,John McCall2012-11-141-4/+5
| | | | | | | which is not coincidentally the only place it works, either (because of how it tests for EH_TYPE symbols). llvm-svn: 167935
* fixes a buildbot failure.Fariborz Jahanian2012-11-141-0/+1
| | | | llvm-svn: 167934
* Fix 80-column violation.Fariborz Jahanian2012-11-141-3/+5
| | | | llvm-svn: 167932
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-146-78/+203
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* Move some GNUStep-specific code out of CGObjCGNU.John McCall2012-11-141-22/+25
| | | | | | Patch by Jonathan Schleifer. llvm-svn: 167925
* Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."Eric Christopher2012-11-131-12/+9
| | | | | | | | temporarily since it breaks the gdb bots. This reverts commit r167807/30305bec25cac981c6d4a3b8be004401310a82a7. llvm-svn: 167887
* Use the 'count' attribute instead of the 'upper_bound' attribute.Bill Wendling2012-11-131-9/+12
| | | | | | | | | If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the same for both of them because we use the 'upper_bound' attribute. Instead use the 'count' attrbute, which gives the correct number of elements in the array. <rdar://problem/12566646> llvm-svn: 167807
* Fix IR generation for bool on PPC (and any other target where bool is not 8 ↵Eli Friedman2012-11-131-5/+7
| | | | | | | | bits in memory). PR11777. llvm-svn: 167802
* objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.Fariborz Jahanian2012-11-101-2/+2
| | | | | | lower 24bit is currently being used. llvm-svn: 167678
* Turn FrontendInputFile into an immutable class and have it also acceptArgyrios Kyrtzidis2012-11-091-1/+1
| | | | | | a memory buffer instead of only a filename. llvm-svn: 167627
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-091-1/+0
| | | | | | us from having to make any backend changes. llvm-svn: 167623
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-091-0/+1
| | | | | | rdar://12340498 llvm-svn: 167619
* When deciding whether to convert an array construction loop into a memcpy, lookRichard Smith2012-11-071-11/+4
| | | | | | | | at whether the *selected* constructor would be trivial rather than considering whether the array's element type has *any* non-trivial constructors of the relevant kind. llvm-svn: 167562
* objective-C blocks: bring back the CharUnit patch forFariborz Jahanian2012-11-071-45/+46
| | | | | | | captured block variable layout meta-data. No intended change in functionality. llvm-svn: 167549
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-073-7/+9
| | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). llvm-svn: 167534
* Put something sane in the DWARF offset field for bitfield ObjC ivars.Eli Friedman2012-11-063-6/+29
| | | | | | | | | This is useful because unnamed bitfields can have effects on the offsets which are not otherwise reflected in the DWARF information. <rdar://problem/12629719> llvm-svn: 167503
* Implement codegen for init_priority attribute properly - make sure itAnton Korobeynikov2012-11-062-19/+48
| | | | | | | | works between the modules. No functionality change on Darwin/Windows. This fixes PR11480. llvm-svn: 167496
* Back out 167431+167437+167487; I didn't realize how incomplete our testEli Friedman2012-11-064-135/+141
| | | | | | coverage of this code is. llvm-svn: 167495
* Fix a silly mistake in r167437.Eli Friedman2012-11-061-2/+2
| | | | llvm-svn: 167487
* Cleanup: 80-column violationManman Ren2012-11-061-4/+6
| | | | llvm-svn: 167476
* ARM byval: when type alignment is bigger than ABI alignment, instead ofManman Ren2012-11-061-5/+4
| | | | | | | | | | | | disabling byval, we set realign to true. It will perform an aligned alloca, and call memcpy to copy the byval argument to the local variable. Change the size threshold back to 64 bytes. rdar://12596507 llvm-svn: 167440
* Propagate CharUnits through CGObjCMac.cpp.Eli Friedman2012-11-061-84/+78
| | | | llvm-svn: 167437
* Minor fix to ObjC layout bitmap metadata. Found while I was trying toEli Friedman2012-11-061-1/+1
| | | | | | refactor the code. llvm-svn: 167436
* Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as ↵Richard Smith2012-11-061-9/+17
| | | | | | -fsanitize=divide-by-zero. llvm-svn: 167433
* Propagate CharUnits into ObjC CodeGen. No intended functional change.Eli Friedman2012-11-064-66/+66
| | | | llvm-svn: 167431
* Have the parser initialize Sema before it consumes the firstDouglas Gregor2012-11-051-1/+3
| | | | | | | | token. This is important because the first token could actually be after an #include that triggers a module import, which might use either Sema or the AST consumer before it would have been initialized. llvm-svn: 167423
* ARM byval: when type alignment is bigger than ABI alignment, we can't guaranteeManman Ren2012-11-051-2/+10
| | | | | | | | | | | the type alignment of the byval argument. This patch will disable byval in this case, it also increases the size threshold for turning on byval. A backend fix will be attempted. rdar://12596507 llvm-svn: 167416
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-055-42/+52
| | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-053-6/+6
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* On PowerPC64, integer arguments and return values need to be sign- orUlrich Weigand2012-11-051-0/+58
| | | | | | | | | | | | | | | | zero-extended to 64 bits. This information is currently provided to the back end by setting "signext" or "zeroext" attributes. However, this is done only for integer types *smaller* than i32, not for i32 itself. This causes clang to generate code violating the ABI, which results in a failure of the tramp3d-v4 test case (due to calling a system library routine without ABI-required extension). This patch implements custom versions of classifyArgumentType and classifyReturnType for PPC64_SVR4_ABIInfo, which are the same as the default versions except that they also classify "int" and "unsigned int" as types needing extending. This fixed tramp3d-v4 on PowerPC64. llvm-svn: 167393
* Fixes liftime of captured block variables in mrr mode, per John's feedback, asFariborz Jahanian2012-11-041-17/+12
| | | | | | well as couple of tests which were not being excercised because of TYPOs. llvm-svn: 167374
* Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead ↵David Blaikie2012-11-021-4/+2
| | | | | | of class_type). llvm-svn: 167336
* objective-C mrr block. Block variable layout metadata inFariborz Jahanian2012-11-021-5/+26
| | | | | | mrr mode. llvm-svn: 167331
* Fix debug tag type of forward declarations of struct/class in C++.David Blaikie2012-11-021-10/+6
| | | | llvm-svn: 167308
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+3
| | | | llvm-svn: 167266
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-0114-48/+48
| | | | llvm-svn: 167261
* Clean up misapplication of diff.Richard Smith2012-11-011-1/+0
| | | | llvm-svn: 167260
* Split emission of -ftrapv checks and -fcatch-undefined-behavior checks intoRichard Smith2012-11-013-25/+34
| | | | | | separate functions, since they share essentially no code. llvm-svn: 167259
* Remove divison-by-zero checks from -ftrapv. These checks were incompatible withRichard Smith2012-11-011-6/+2
| | | | | | | g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still available under -fcatch-undefined-behavior. llvm-svn: 167258
* Silence -Wformat on platforms where uint64_t is unsigned long.Matt Beaumont-Gay2012-11-011-1/+1
| | | | llvm-svn: 167249
* objective-C block meta-data. This patch completes meta-dataFariborz Jahanian2012-11-013-18/+174
| | | | | | | | generation for captured block variables in arc mode. This includes inlined version of the meta-data when it can be done. It also includes severat tests. This is wip. // rdar://12184410. llvm-svn: 167241
* -fcatch-undefined-behavior: Start checking loads and stores for null pointers.Richard Smith2012-11-011-11/+11
| | | | | | | | We want the diagnostic, and if the load is optimized away, we still want to trap it. Stop checking non-default address spaces; that doesn't work in general. llvm-svn: 167219
* ARM AAPCS-VFP: fix tracking of allocated VFP registers.Manman Ren2012-10-311-24/+50
| | | | | | | According to the spec, we can backfill VFP registers that were skipped due to alignment constraints. llvm-svn: 167159
* ARM AAPCS-VFP: fix handling of homogeneous aggreate.Manman Ren2012-10-301-6/+80
| | | | | | | If HA can only partially fit into VFP registers, we add padding to make sure HA will be on stack and later VFP CPRCs will be on stack as well. llvm-svn: 167058
* objective-C arc/mrr: Another patch for the new captured block variable Fariborz Jahanian2012-10-301-23/+191
| | | | | | layout meta-data. It is currently off (so no tests). This is wip. llvm-svn: 167047
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-301-1/+1
| | | | llvm-svn: 167021
* Don't crash on bad atomic operations. PR14176.Eli Friedman2012-10-301-7/+13
| | | | llvm-svn: 166992
* Revert commit r166946Quentin Colombet2012-10-291-3/+0
| | | | llvm-svn: 166957
* Make forcesizeopt attribute available to the end userQuentin Colombet2012-10-291-0/+3
| | | | llvm-svn: 166946
OpenPOWER on IntegriCloud