summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* add a testcase for PR12094 and fix a crash on pointer to incomplete type,Chris Lattner2012-03-041-3/+7
| | | | | | reported by Richard Smith. llvm-svn: 151993
* Reinstate r151879, r151880, reverted in r151922, along with a bugfix forRichard Smith2012-03-024-30/+49
| | | | | | | | | scalar emission of DeclRefExprs to const bools: emit scalar bools as i1, not as i8. In addition to the extra unit testing, this has successfully bootstrapped. llvm-svn: 151955
* PR12094: Set the alignment of memory intrinsic instructions based on theJay Foad2012-03-022-29/+57
| | | | | | types of the pointer arguments. llvm-svn: 151927
* Revert r151879, r151880, "PR12145: Avoid emitting loads of constexpr ↵Daniel Dunbar2012-03-021-15/+9
| | | | | | | | variables in contexts where there" and "Fix buildbot: make this test less dependent on the value names in the produced IR." They broke bootstrap. llvm-svn: 151922
* PR12145: Avoid emitting loads of constexpr variables in contexts where thereRichard Smith2012-03-021-9/+15
| | | | | | | is no odr-use of the variable. Go slightly beyond what the standard requires for variables of reference type. llvm-svn: 151879
* Make CodeGenFunction::EmitBlockCopyAndAutorelease actually do what its name ↵Eli Friedman2012-03-011-4/+4
| | | | | | says. llvm-svn: 151853
* Add a flag -fthread-sanitizer.Kostya Serebryany2012-03-011-1/+13
| | | | | | | | | | This flag enables ThreadSanitizer instrumentation committed to llvm as r150423. The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer. This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet committed and it's structure in compiler-rt is not 100% clear. The users manual wil be changed in a separate commit. llvm-svn: 151846
* Reapply r151702 with a small fix for a failure to cut and pasteEric Christopher2012-03-011-30/+61
| | | | | | | | correctly. Still rdar://10900684 llvm-svn: 151838
* Implement "optimization" for lambda-to-block conversion which inlines the ↵Eli Friedman2012-03-014-11/+19
| | | | | | | | generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap. Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed. llvm-svn: 151797
* Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiatedChad Rosier2012-02-291-0/+6
| | | | | | | | | by the BAA pass, which uses the default TargetLibraryInfo constructor. Unfortunately, the default TargetLibraryInfo constructor assumes all library calls are available and thus ignores -fno-builtin. rdar://10947759 llvm-svn: 151745
* Revert r151702, "Add support for handling captured variables in lambda debugDaniel Dunbar2012-02-291-61/+30
| | | | | | info.", which broke some -O0 -g tests. llvm-svn: 151730
* Add support for handling captured variables in lambda debug info.Eric Christopher2012-02-291-30/+61
| | | | | | | | | | | | This currently doesn't handle capturing the 'this' pointer for any enclosing class. Steal the lambda-expressions.cpp testcase and debugify it and try to use more variables to proof it against random changes. Part of rdar://10900684 llvm-svn: 151702
* Formatting.Eric Christopher2012-02-291-1/+1
| | | | llvm-svn: 151700
* Make sure list-initialization of arrays works correctly in explicit type ↵Eli Friedman2012-02-291-1/+1
| | | | | | conversions. PR12121. llvm-svn: 151674
* Prefer bitcast+GEP over ptrtoint+sub+inttoptr: it's semantically equivalent ↵Eli Friedman2012-02-281-3/+3
| | | | | | here, and generally nicer to the optimizer. llvm-svn: 151659
* Remove stray semi-colons.Daniel Dunbar2012-02-281-2/+2
| | | | llvm-svn: 151631
* Implement IRGen for the retain-autorelease in the lambda ↵Eli Friedman2012-02-283-2/+27
| | | | | | conversion-to-block-pointer outside of ARC. Testcases coming up soon. llvm-svn: 151603
* Hack in a loud error for PR12086. Better than a silent miscompile.Sebastian Redl2012-02-271-1/+12
| | | | llvm-svn: 151586
* Add missing code for compound literals of complex type. ↵Eli Friedman2012-02-271-0/+4
| | | | | | <rdar://problem/10938628> llvm-svn: 151549
* ObjcInterfaceTypes are also complete types for the type cache.Eric Christopher2012-02-271-3/+3
| | | | | | Fixes rdar://10934887 llvm-svn: 151519
* Ensure that we delete destructors in the right cases. Specifically:Richard Smith2012-02-261-0/+4
| | | | | | | | | | | | | | - variant members with nontrivial destructors make the containing class's destructor deleted - check for a virtual destructor after checking for overridden methods in the base class(es) - check for an inaccessible operator delete for a class with a virtual destructor. Do not try to call an anonymous union field's destructor from the destructor of the containing class. llvm-svn: 151483
* CodeGen support for global variables of type std::initializer_list<X>.Sebastian Redl2012-02-253-3/+121
| | | | | | | | | | | | | This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! llvm-svn: 151457
* Fix crashers on unexpected std::initializer_list layouts. Found by inspection.Sebastian Redl2012-02-251-0/+4
| | | | llvm-svn: 151456
* Prevent llvm.lifetime intrinsics from being emitted at -O0.Chad Rosier2012-02-251-1/+5
| | | | | | rdar://10921594 llvm-svn: 151430
* Work-in-progress for lambda conversion-to-block operator. Still need to ↵Eli Friedman2012-02-254-27/+85
| | | | | | implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure). llvm-svn: 151428
* Trying to increase my Ohloh ranking with trivial tweaksDouglas Gregor2012-02-251-6/+2
| | | | llvm-svn: 151414
* Simplify check per Eli's commentDouglas Gregor2012-02-251-4/+1
| | | | llvm-svn: 151412
* Fix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.Eli Friedman2012-02-241-3/+5
| | | | llvm-svn: 151407
* For the purposes of building LLVM types, a forward-declaredDouglas Gregor2012-02-241-1/+6
| | | | | | | enumeration type with a fixed underlying type is complete. Fixes <rdar://problem/10916155>. llvm-svn: 151403
* Reapply r151172 - Unwind path cleanup for array new list initializers - with aChad Rosier2012-02-241-7/+32
| | | | | | test case that only runs on debug builds. llvm-svn: 151311
* Replace a use of hasTrivialDefaultConstructor() with the appropriateDouglas Gregor2012-02-231-1/+1
| | | | | | isTrivial() call. llvm-svn: 151259
* PR12067: When emitting an evaluated constant structure in C++11 mode, don'tRichard Smith2012-02-231-12/+82
| | | | | | forget the vptrs. llvm-svn: 151245
* Try to handle qualifiers more consistently for array InitListExprs. Fixes ↵Eli Friedman2012-02-231-4/+2
| | | | | | | | <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent. (I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) llvm-svn: 151229
* Add a quick TODO.Eric Christopher2012-02-231-0/+1
| | | | llvm-svn: 151217
* Fold debug scope emission into the cleanup scope.Eric Christopher2012-02-231-9/+2
| | | | llvm-svn: 151216
* Revert r151172: Unwind path cleanup for array new list initializers.Chad Rosier2012-02-221-32/+7
| | | | llvm-svn: 151203
* Unwind path cleanup for array new list initializers.Sebastian Redl2012-02-221-7/+32
| | | | llvm-svn: 151172
* CodeGen for array new list initializers. Doesn't correctly clean up in the ↵Sebastian Redl2012-02-221-27/+69
| | | | | | face of exceptions yet. llvm-svn: 151171
* Use an ArrayRef when we can instead of passing in a SmallVectorImpl reference.Bill Wendling2012-02-224-35/+33
| | | | llvm-svn: 151150
* Make sure null initialization in arrays works correctly with ARC types. ↵Eli Friedman2012-02-221-2/+7
| | | | | | <rdar://problem/10907547>. llvm-svn: 151133
* Generate an AST for the conversion from a lambda closure type to aDouglas Gregor2012-02-225-1/+9
| | | | | | | | | | | | | | | block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. llvm-svn: 151131
* Adding support for Microsoft's thiscall calling convention. Clang side of ↵Aaron Ballman2012-02-221-9/+23
| | | | | | the patch. llvm-svn: 151122
* Emit the exact size for the invariant intrinsics.Nick Lewycky2012-02-211-4/+7
| | | | llvm-svn: 151010
* Formatting.Eric Christopher2012-02-201-6/+6
| | | | llvm-svn: 150996
* objc IRGen: force CSE of load of ivar offsets by settingFariborz Jahanian2012-02-201-1/+6
| | | | | | | the 'invariant.load' metadata tag onto those loads. // rdar://10840980 llvm-svn: 150994
* Remove the type retaining from the clang frontend. This is nowEric Christopher2012-02-201-4/+6
| | | | | | | | | | handled by the caching and rauw. Also fix one cache that wasn't being added to highlighted by this patch. Update all testcases accordingly. This should fix the deall failure. llvm-svn: 150977
* Make forward declarations for objective-c types use the newEric Christopher2012-02-201-17/+14
| | | | | | | temporary forward declaration nodes. Fixes a problem building Chrome. llvm-svn: 150976
* Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ toChandler Carruth2012-02-201-0/+2
| | | | | | | | | | | | | | | | match the behavior of GCC. Also add a test for these intrinsics, which apparently have *zero* tests. =[ Not surprisingly, Clang crashed when compiling these. Fix the bug in CodeGen where we failed to bitcast the argument type to x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the new 3dnow-builtins.c test. This is one issue impacting the efforts to get Clang to emulate the Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made available there. llvm-svn: 150948
* Make heap-allocation of std::initializer_list 'work'.Sebastian Redl2012-02-195-10/+10
| | | | llvm-svn: 150931
* Make std::initializer_list member initializers 'work'.Sebastian Redl2012-02-191-31/+37
| | | | llvm-svn: 150930
OpenPOWER on IntegriCloud