summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Documentation cleanup:James Dennett2012-06-155-18/+17
| | | | | | | | * Escaped Objective-C @keywords in Doxygen comments; * Documented more accurate \params; * Exposed some more summaries using \brief. llvm-svn: 158559
* Documentation fix: made the name given to \param match the code.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158511
* Documentation fixes: Added \brief markup and fixed some formatting.James Dennett2012-06-151-1/+3
| | | | llvm-svn: 158501
* It turns out that implementing the rethrow-on-fallthroughJohn McCall2012-06-151-18/+20
| | | | | | | | | | semantics of a ctor/dtor function-try-block catch handler by pushing a normal cleanup is not just overkill but actually actively wrong when the handler contains an explicit return (which is only legal in a dtor). Just emit the rethrow as ordinary code at the fallthrough point. Fixes PR13102. llvm-svn: 158488
* More doxygen/documentation cleanups.James Dennett2012-06-131-5/+5
| | | | | | | | | | | | | | | | | | This reduces the number of warnings generated by Doxygen by about 100 (roughly 10%). Issues addressed: (1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments when they're not supposed to be Doxygen commands or links, and similarly for "<baz>" when it's not intended as as HTML tag; (2) Changed some \t commands (which don't exist) to \c ("to refer to a word of code", as the Doxygen manual says); (3) \precondition becomes \pre; (4) When touching comments, deleted a couple of spurious spaces in them; (5) Changed some \n and \r to \\n and \\r; (6) Fixed one tiny typo: #pragms -> #pragma. This patch touches documentation/comments only. llvm-svn: 158422
* Remove unused variable.Bill Wendling2012-06-121-1/+0
| | | | llvm-svn: 158353
* Make CodeGenFunction::EmitMSAsmStmt throw a fatal error as MS-style inlineChad Rosier2012-06-111-37/+2
| | | | | | assembly is completely untested and unsupported. llvm-svn: 158329
* Etch out the code path for MS-style inline assembly.Chad Rosier2012-06-112-0/+42
| | | | llvm-svn: 158325
* Documentation cleanup, fixing Doxygen markup. Mostly this avoids common termsJames Dennett2012-06-111-1/+1
| | | | | | | | | | | | | | such as "protocol" and "expression" being implicitly turned into links to mistakenly-generated Doxygen pages: - Escaping @ symbols when Doxygen would otherwise incorrectly interpret them; - Escaping # symbols when they're not intended as explicit Doxygen link requests, such as when discussing preprocessor directives; - In one odd case, unescaping @ in @__experimental_modules_import, because Doxygen wrote '\@' to the output in that case, causing the example in the description of ImportDecl to be wrong; and - Fixing a typo: @breif -> @brief. llvm-svn: 158299
* PR13064: Store whether an in-class initializer uses direct or copyRichard Smith2012-06-102-6/+8
| | | | | | | initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
* [C++11 Compat] Fix breaking change in C++11 pair copyctor.Michael J. Spencer2012-06-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While this code is valid C++98, it is not valid C++11. The problem can be reduced to: class MDNode; class DIType { operator MDNode*() const {return 0;} }; class WeakVH { WeakVH(MDNode*) {} }; int main() { DIType di; std::pair<void*, WeakVH> p(std::make_pair((void*)0, di))); } This was not detected by any of the bots we have because they either compile C++98 with libstdc++ (which allows it), or C++11 with libc++ (which incorrectly allows it). I ran into the problem when compiling with VS 2012 RC. Thanks to Richard for explaining the issue. llvm-svn: 158245
* User better API for vla in compund literals.Fariborz Jahanian2012-06-071-4/+3
| | | | | | // rdar://11485774 llvm-svn: 158157
* When emitting compund literal of vla pointer elements, make Fariborz Jahanian2012-06-071-1/+5
| | | | | | | sure to emit vla size to prevent an irgen crash. // rdar://11485774 llvm-svn: 158153
* Plug a long standing memory leak in TemplateArgument.Benjamin Kramer2012-06-071-1/+1
| | | | | | | | | | | | | | | The integral APSInt value is now stored in a decomposed form and the backing store for large values is allocated via the ASTContext. This way its not leaked as TemplateArguments are never destructed when they are allocated in the ASTContext. Since the integral data is immutable it is now shared between instances, making copying TemplateArguments a trivial operation. Currently getting the integral data out of a TemplateArgument requires creating a new APSInt object. This is cheap when the value is small but can be expensive if it's not. If this turns out to be an issue a more efficient accessor could be added. llvm-svn: 158150
* reverse r158117.Fariborz Jahanian2012-06-061-3/+0
| | | | llvm-svn: 158119
* When doing arithmatic on vla pointer, make sureFariborz Jahanian2012-06-061-0/+3
| | | | | | | to emit vla size to prevent an irgen crash. // rdar://11485774 llvm-svn: 158117
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-0612-52/+51
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Remove unused private member variables found by clang's new ↵Benjamin Kramer2012-06-062-3/+1
| | | | | | -Wunused-private-field. llvm-svn: 158086
* Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.Eli Friedman2012-06-051-2/+7
| | | | llvm-svn: 158017
* Reapply "Only emit debug information for methods that are user defined, there's"Eric Christopher2012-06-051-2/+6
| | | | | | | | As the failing testcase has been fixed. This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e. llvm-svn: 158009
* Revert "Only emit debug information for methods that are user defined, there's"John McCall2012-06-051-6/+2
| | | | | | | This reverts r157970, which was not passing on clang-x86_64-darwin10-nobootstrap-RA llvm-svn: 157983
* Only emit debug information for methods that are user defined, there'sEric Christopher2012-06-051-2/+6
| | | | | | | | | not much reason to emit for constructors and destructors that aren't user defined. rdar://11593099 llvm-svn: 157970
* Support C++11 enum forward declarations.Eric Christopher2012-06-011-1/+2
| | | | | | Part of rdar://11570854 llvm-svn: 157787
* objective-c: fix a sema and IRGen crash when propertyFariborz Jahanian2012-05-292-6/+10
| | | | | | | | getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 llvm-svn: 157641
* OpenCL: Fix vector conditional operator CodeGen for the case wherePeter Collingbourne2012-05-291-1/+1
| | | | | | the operands are vectors of doubles. llvm-svn: 157596
* adjust to mainline llvm API change.Chris Lattner2012-05-282-6/+3
| | | | llvm-svn: 157557
* fix codegen support for alloc_size attribute for static C++ methodsNuno Lopes2012-05-251-2/+4
| | | | | | add test case for C++ codegen llvm-svn: 157500
* add CodeGen support for the alloc_size attributeNuno Lopes2012-05-251-0/+17
| | | | llvm-svn: 157483
* Replace PTX back-end with NVPTX back-end in all places where Clang caresJustin Holewinski2012-05-241-18/+18
| | | | | | NV_CONTRIB llvm-svn: 157403
* If the first argument of __builtin_object_size can be folded to a constantRichard Smith2012-05-231-0/+4
| | | | | | | | pointer, but such folding encounters side-effects, ignore the side-effects rather than performing them at runtime: CodeGen generates wrong code for __builtin_object_size in that case. llvm-svn: 157310
* Emit C++11 enum class information if it exists.Eric Christopher2012-05-231-1/+4
| | | | | | Part of rdar://11496790 llvm-svn: 157304
* wire -fbounds-checking to the new LLVM bounds checking passNuno Lopes2012-05-223-2/+15
| | | | llvm-svn: 157262
* revert the usage of the objectsize intrinsic with 3 parameters (to match ↵Nuno Lopes2012-05-222-6/+2
| | | | | | LLVM r157255) llvm-svn: 157256
* Revert r115805. An array type is required to have a range type,Eric Christopher2012-05-211-18/+14
| | | | | | | | | | however, the range can be unknown for the upper bound. Testcase to follow. Part of rdar://11457152 llvm-svn: 157212
* Teach Clang about the NVPTX backend.Peter Collingbourne2012-05-201-0/+2
| | | | llvm-svn: 157173
* CUDA: add CodeGen support for global variable address spaces.Peter Collingbourne2012-05-202-3/+27
| | | | | | | | | Because in CUDA types do not have associated address spaces, globals are declared in their "native" address space, and accessed by bitcasting the pointer to address space 0. This relies on address space 0 being a unified address space. llvm-svn: 157167
* Zap a bogus assert for delegating constructors. PR12890, part 2.Eli Friedman2012-05-201-1/+0
| | | | | | I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase. llvm-svn: 157138
* Update API usage for llvm DIBuilder changes for rvalue referenceEric Christopher2012-05-191-4/+6
| | | | | | | | types and ensure we are actually creating the type. rdar://11479676 llvm-svn: 157095
* Remove unnecessary temporary.Eric Christopher2012-05-161-3/+1
| | | | llvm-svn: 156953
* Fix code generation of variables reference expressions when mixingDouglas Gregor2012-05-161-1/+1
| | | | | | | blocks and lambdas, based heavily on a patch from Meador Inge. Fixes PR12746 / <rdar://problem/11465120>. llvm-svn: 156925
* Implement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and theRichard Smith2012-05-142-7/+15
| | | | | | expression is treated as an lvalue. llvm-svn: 156781
* Add support for __attribute__((hot)) and __attribute__((cold)).Benjamin Kramer2012-05-121-0/+4
| | | | | | | | Currently cold functions are marked with the "optsize" attribute in CodeGen so they are always optimized for size. The hot attribute is just ignored, LLVM doesn't have a way to express hotness at the moment. llvm-svn: 156723
* Coerce byval aggregate arguments to integers whose size matches the integerAkira Hatanaka2012-05-111-35/+44
| | | | | | | register size of the target architecture. llvm-svn: 156650
* Fix handling of vector return types.Akira Hatanaka2012-05-111-1/+1
| | | | | | | A vector should be returned via the hidden pointer argument except if its size is equal to or smaller than 16-bytes and the target ABI is N32 or N64. llvm-svn: 156642
* Hexagon V5 intrinsics support in clang.Sirish Pande2012-05-111-155/+751
| | | | llvm-svn: 156630
* Implement PPC64TargetCodeGenInfo.Roman Divacky2012-05-091-0/+60
| | | | llvm-svn: 156491
* update calls to objectsize intrinsic to match LLVM r156473Nuno Lopes2012-05-092-4/+6
| | | | | | add a test for -fbounds-checking code generation llvm-svn: 156474
* add -fbounds-checking option.Nuno Lopes2012-05-083-1/+7
| | | | | | | | When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend. OK'ed by Chad; thanks for the review. llvm-svn: 156431
* The address of a vla is actually complex and requires a dereference.Eric Christopher2012-05-081-1/+18
| | | | | | Part of rdar://11352000 llvm-svn: 156407
* Whitespace.Eric Christopher2012-05-081-1/+0
| | | | llvm-svn: 156406
OpenPOWER on IntegriCloud