summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-0/+1
| | | | | | // rdar://10033896 llvm-svn: 139041
* revert patch in r139020Fariborz Jahanian2011-09-021-1/+5
| | | | llvm-svn: 139029
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-5/+1
| | | | | | // rdar://10033896 llvm-svn: 139020
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-0218-46/+46
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Don't try to emit unsupported templated friend declarations. They're unsupportedNick Lewycky2011-09-011-2/+3
| | | | | | | and may very well be dependent-types, triggering an assertion in debug info codegen. llvm-svn: 138970
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-303-10/+20
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-302-3/+31
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* Be sure to emit lvalue-to-rvalue casts for loads from x-values.John McCall2011-08-301-24/+18
| | | | | | | Doing this happens to disrupt the pattern that ARC was looking for for move optimizations, so we need to fix that simultaneously. llvm-svn: 138789
* Remove unused variables noticed by GCC.Benjamin Kramer2011-08-271-1/+0
| | | | llvm-svn: 138707
* Slight optimization enabled by the previous assert: John McCall2011-08-262-3/+4
| | | | | | emit all gl-value arguments as reference bindings. llvm-svn: 138655
* Assert that a call argument is a gl-value iff the parameter is a reference type.John McCall2011-08-261-0/+3
| | | | llvm-svn: 138639
* What say we document some of these AggValueSlot flags a bitJohn McCall2011-08-263-29/+43
| | | | | | better. llvm-svn: 138628
* Since the 'is aliased' bit is critical for correctness in C++, itJohn McCall2011-08-263-6/+10
| | | | | | | | | really shouldn't be optional. Fix the remaining place where a temporary was being passed as potentially-aliased memory. Fixes PR10756. llvm-svn: 138627
* An initialization does not alias.John McCall2011-08-261-1/+2
| | | | llvm-svn: 138624
* The allocated exception slot does not alias anything; should fix self-host.John McCall2011-08-261-1/+2
| | | | llvm-svn: 138615
* [driver] Add -mglobal-merge/-mno-global-merge machine options to ↵Chad Rosier2011-08-261-0/+2
| | | | | | | | | enable/disable merging of globals during codegen. Fixes <rdar://problem/10017909>. llvm-svn: 138612
* Track whether an AggValueSlot is potentially aliased, and do notJohn McCall2011-08-2510-33/+70
| | | | | | | | | | emit call results into potentially aliased slots. This allows us to properly mark indirect return slots as noalias, at the cost of requiring an extra memcpy when assigning an aggregate call result into a l-value. It also brings us into compliance with the x86-64 ABI. llvm-svn: 138599
* Use stronger typing for the flags on AggValueSlot and requireJohn McCall2011-08-2511-60/+87
| | | | | | | creators to tell us whether something needs GC barriers. No functionality change. llvm-svn: 138581
* blocks - capturing logic of byref block variable's expression Fariborz Jahanian2011-08-251-1/+17
| | | | | | | statement initializer makes safe assumption when a substatement is encounterred (with a fix me). llvm-svn: 138528
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-1/+1
| | | | llvm-svn: 138451
* Make constant aggregate constant initializers private linkage.Eric Christopher2011-08-241-1/+1
| | | | | | | | | After talking with John making this the case for all of these is the right way to go. Fixes rdar://9804564 and PR10414 llvm-svn: 138418
* Whitespace and 80-col cleanup.Eric Christopher2011-08-231-3/+2
| | | | llvm-svn: 138413
* Whitespace.Eric Christopher2011-08-231-45/+45
| | | | llvm-svn: 138404
* Cleanup to use helper.Eli Friedman2011-08-231-1/+1
| | | | llvm-svn: 138369
* checking for __block variable captured by givenFariborz Jahanian2011-08-231-2/+9
| | | | | | | stmt expression, recursively walk down all substatements of the stmt expression. // rdar://10001085 llvm-svn: 138334
* block IRgen - Fixes a crash when determining if given block variableFariborz Jahanian2011-08-231-0/+3
| | | | | | is captured by a given statement expression. // rdar://10001085 llvm-svn: 138314
* Make sure we don't inline functions marked with __attribute__((naked)). ↵Eli Friedman2011-08-221-4/+9
| | | | | | <rdar://problem/9973228> llvm-svn: 138310
* Fix a handful of dead stores found by Clang's static analyzer. There's a ↵Ted Kremenek2011-08-171-2/+2
| | | | | | bunch of others I haven't touched. llvm-svn: 137867
* Mark objc methods that are implicitly declared for properties (not ↵Argyrios Kyrtzidis2011-08-171-3/+9
| | | | | | | | user-declared) as implicit. This results in libclang ignoring such methods. llvm-svn: 137852
* Finalize debug info after all deferred globals are emitted.Devang Patel2011-08-161-2/+3
| | | | llvm-svn: 137750
* Use new DIBuilder::finalize() at the end to wrap up debug info encoding for ↵Devang Patel2011-08-152-0/+3
| | | | | | a translation unit. llvm-svn: 137674
* 'pure' and 'const' functions should also be marked nounwind. MigrateEric Christopher2011-08-151-2/+7
| | | | | | | test over from llvm/test/FrontendC++ and update others to account for the change. llvm-svn: 137669
* Fix r137086 to actually work properly in general. PR10650.Eli Friedman2011-08-141-2/+1
| | | | llvm-svn: 137574
* Implement function template specialization at class scope extension in ↵Francois Pichet2011-08-141-0/+1
| | | | | | | | | | | | | | | | | Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. Example: template <class T> class A { public: template <class U> void f(U p) { } template <> void f(int p) { } // <== class scope specialization }; This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code. BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error. llvm-svn: 137573
* Move handling of vget_lane/vset_lane before the code that checks the type.Bob Wilson2011-08-131-24/+31
| | | | | | | | | Unlike most of the other Neon intrinsics, these are not overloaded and do not have the extra argument that specifies the vector type. This has not been fatal because the lane number operand is supposed to be an ICE and so that value has harmlessly been used as the type identifier. Radar 9901281. llvm-svn: 137550
* switch clang to use the new-new way of creating llvm::StructType's.Chris Lattner2011-08-125-113/+80
| | | | llvm-svn: 137472
* Alignment of a va_arg must be at least as large as the ABI's minimum alignment.Akira Hatanaka2011-08-121-0/+1
| | | | llvm-svn: 137420
* Add definition of a static member of a class.Akira Hatanaka2011-08-121-0/+2
| | | | llvm-svn: 137411
* Encapsulate the Objective-C id/Class/SEL "redefinition" types inDouglas Gregor2011-08-111-2/+2
| | | | | | | | | ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. llvm-svn: 137349
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-118-634/+525
| | | | | | | | | | | | | | | hierarchy of delegation, and that EH selector values are meaningful function-wide (good thing, too, or inlining wouldn't work). 2,3d 1a hierarchy of delegation and that EH selector values have the same meaning everywhere in the function instead of being meaningful only in the context of a specific selector. This removes the need for routing edges through EH cleanups, since a cleanup simply always branches to its enclosing scope. llvm-svn: 137293
* Formatting.John McCall2011-08-101-1/+1
| | | | llvm-svn: 137200
* Revert bad change. (It may look equivalent, but it isn't.)Eli Friedman2011-08-091-1/+1
| | | | llvm-svn: 137132
* Cleanup; no functionality change.Eli Friedman2011-08-093-10/+4
| | | | llvm-svn: 137126
* Move the creation of the record type for the state of Objective-C fastDouglas Gregor2011-08-093-1/+44
| | | | | | | | enumerations from the ASTContext into CodeGen, so that we don't need to serialize it to AST files. This appears to be the last of the low-hanging fruit for SpecialTypes. llvm-svn: 137124
* Move the construction of the RecordDecl representing the runtimeDouglas Gregor2011-08-092-6/+54
| | | | | | | | layout of a constant NSString from the ASTContext over to CodeGen, since this is solely CodeGen's responsibility. Eliminates one of the unnecessary "special" types that we serialize. llvm-svn: 137121
* Hand materialization of temporary expressions when emitting a scalarDouglas Gregor2011-08-091-0/+5
| | | | | | expression. Fxies PR10592. llvm-svn: 137086
* Fix typo so we don't use the wrong function for ending ObjC++ catch blocks ↵David Chisnall2011-08-081-1/+1
| | | | | | (GNU runtimes) llvm-svn: 137052
* Avoid fallthrough-branching to an inactive cleanup even if it'sJohn McCall2011-08-071-44/+33
| | | | | | otherwise required. llvm-svn: 137029
* Be sure to destroy the normal entry block of a cleanup that weJohn McCall2011-08-061-9/+46
| | | | | | | | | | | | | | | aren't actually going to make a normal cleanup for. Sometimes we optimistically create branches to such blocks for fixups, and then we resolve the fixup to somewhere within the cleanup's scope, and then the cleanup is actually not reachable for some reason. The process of resolving the fixup leaves us with switches whose default edge leads to the cleanup; we can replace that with unreachable, then (in many cases) turn the switch into an unconditional branch. Fixes PR10467. llvm-svn: 137011
* The continue label in an ARC for-in loop should not involveJohn McCall2011-08-051-1/+4
| | | | | | releasing the collection. llvm-svn: 136949
OpenPOWER on IntegriCloud