summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Emit wide string literals with the appropriate alignment.John McCall2011-08-042-17/+29
| | | | | | Patch by Craig Topper and Sundeep! llvm-svn: 136856
* Use the general conditional-cleanup framework instead of rolling ourJohn McCall2011-08-031-45/+4
| | | | | | own, incorrectly, for releasing objects at the end of a full-expression. llvm-svn: 136823
* Handle "homogeneous aggregates" as required by the ARM AAPCS-VFP ABI.Bob Wilson2011-08-032-48/+154
| | | | | | | | | | | | | A homogeneous aggregate is an aggregate data structure where after flattening any nesting there are 1 to 4 elements of the same base type that is either a float, double, or Neon vector. All Neon vectors of the same size, either 64 or 128 bits, are treated as equivalent for this purpose. When using the AAPCS-VFP ABI, check for homogeneous aggregates and pass them as arguments by expanding them into a sequence of their base types. This requires extending the existing support for expanded arguments to handle not only structs, but also constant arrays and complex types. llvm-svn: 136767
* When rewriting a call to a K&R function to lead to a well-prototypedJohn McCall2011-08-031-1/+20
| | | | | | | function, be sure to drop parameter attributes when dropping their associated arguments. Patch by Aaron Landwehr! llvm-svn: 136753
* Implements alignment for long long and double types in va_arg on ARM AAPCS.Rafael Espindola2011-08-021-1/+10
| | | | | | Patch by Jim (Ningjie) Chen. llvm-svn: 136734
* Update for LLVM change in PassManagerBuilder.Rafael Espindola2011-08-021-1/+5
| | | | llvm-svn: 136728
* PR10566: Make sure codegen for deleting an pointer to an incomplete type ↵Eli Friedman2011-08-021-1/+1
| | | | | | actually works. llvm-svn: 136703
* Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"Bob Wilson2011-08-011-10/+6
| | | | | | | | | | | This reverts commit 67d097e1232b7d66f58989c16a45b8a11721f76e. We found a miscompile with ARM byval, which is still being investigated. In the meantime, this works around the problem by disabling ARM byval. Conflicts: lib/CodeGen/TargetInfo.cpp llvm-svn: 136662
* Implement MipsABIInfo::EmitVAArg. This fix enables clang to complete compilationAkira Hatanaka2011-08-011-1/+31
| | | | | | | | | | without bailing out when va_arg is an aggregate expression. However, alignment checking needs to be added in isSafeToEliminateVarargsCast in InstCombineCalls.cpp in order to produce correct mips code (see link below). http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042047.html llvm-svn: 136647
* Pass records with non-trivial destructors or constructors indirectly.Akira Hatanaka2011-08-011-0/+5
| | | | llvm-svn: 136630
* Fix linkage type for tentative definition of ivar offset variables (GNUstep ↵David Chisnall2011-08-011-2/+2
| | | | | | runtime) llvm-svn: 136628
* Remove some unnecessary single element array temporaries.Jay Foad2011-07-296-38/+20
| | | | llvm-svn: 136461
* Fix assertion failure in CodeGen where the input operand to an asmPeter Collingbourne2011-07-291-1/+5
| | | | | | | instruction is tied to an output operand which is a pointer, and the input operand is narrower than the output operand. llvm-svn: 136438
* Fix a couple of problems with initialization and assignment toJohn McCall2011-07-282-2/+12
| | | | | | | | | | | __block variables where the act of initialization/assignment itself causes the __block variable to be copied to the heap because the variable is of block type and is being assigned a block literal which captures the variable. rdar://problem/9814099 llvm-svn: 136337
* The lock operand to an @synchronized statement is also John McCall2011-07-271-10/+15
| | | | | | | supposed to be a full-expression; make it so. In ARC, make sure we retain the lock for the entire protected block. llvm-svn: 136271
* CodeGen: rename CodeGenModule::Runtime to ObjCRuntimePeter Collingbourne2011-07-273-14/+14
| | | | llvm-svn: 136254
* Make CodeGen for array delete involving incomplete class work without ↵Eli Friedman2011-07-271-21/+1
| | | | | | crashing. Should fix regression on g++.dg/init/delete1.C. llvm-svn: 136241
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-271-2/+14
| | | | llvm-svn: 136210
* Clean up the analysis of the collection operand to ObjCJohn McCall2011-07-271-2/+20
| | | | | | | | | | | for-in statements; specifically, make sure to close over any temporaries or cleanups it might require. In ARC, this has implications for the lifetime of the collection, so emit it with a retain and release it upon exit from the loop. rdar://problem/9817306 llvm-svn: 136204
* Disable the optimization that skips emission of complete, non-virtualDouglas Gregor2011-07-261-5/+1
| | | | | | | | | destructors of abstract classes. It's undefined behavior to actually call the destructor (e.g., via delete), but the presence of code that calls this destructor doesn't make the program ill-formed. Fixes <rdar://problem/9819242>. llvm-svn: 136180
* Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth2011-07-252-4/+3
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135969
* Mechanically rename SourceManager::getInstantiationLoc andChandler Carruth2011-07-251-2/+2
| | | | | | | | FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
* Shorten some expressions by using ArrayRef::slice().Frits van Bommel2011-07-251-6/+3
| | | | llvm-svn: 135910
* fix PR10415, tidying up IR representation of module level inline asmChris Lattner2011-07-231-0/+2
| | | | | | to avoid extraneous \n's. llvm-svn: 135862
* Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner2011-07-234-6/+6
| | | | | | Mulder! llvm-svn: 135855
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-2333-339/+338
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* clean up forward declarations of raw_ostream to use the new LLVM.hChris Lattner2011-07-232-5/+6
| | | | | | patch by Jon Mulder! llvm-svn: 135851
OpenPOWER on IntegriCloud