summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Revamp builder-type call formatting.Daniel Jasper2013-08-274-65/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously builder-type calls were only correctly recognized in top-level calls. This fixes llvm.org/PR16981. Before: someobj->Add((new util::filetools::Handler(dir))->OnEvent1( NewPermanentCallback(this, &HandlerHolderClass::EventHandlerCBA)) ->OnEvent2(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBB)) ->OnEvent3(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBC)) ->OnEvent5(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBD)) ->OnEvent6(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBE))); After: someobj->Add((new util::filetools::Handler(dir)) ->OnEvent1(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBA)) ->OnEvent2(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBB)) ->OnEvent3(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBC)) ->OnEvent5(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBD)) ->OnEvent6(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBE))); llvm-svn: 189337
* [-cxx-abi microsoft] Change the vdtor implicit should_call_delete argument ↵Timur Iskhodzhanov2013-08-272-21/+20
| | | | | | type to int llvm-svn: 189336
* clang-format: Fix bug in column layout.Daniel Jasper2013-08-272-2/+9
| | | | | | | | | | | | Before (with 60 character limit in Google style): return { {aaaaaaaaaaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaa}}; After: return {{aaaaaaaaaaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaaaaaaaaaa}, {aaaaaaaaaaaaaaaaa}}; llvm-svn: 189327
* [-cxx-abi microsoft] Remove ArgIndex, we handle all template argument kinds!David Majnemer2013-08-271-20/+6
| | | | | | | TemplateExpansion cannot happen here because MSVC doesn't mangle anything but the fully substituted template arguments. llvm-svn: 189325
* PR14569: Omit debug info for thunksDavid Blaikie2013-08-272-1/+2
| | | | | | | | | | | | | | | | | | This was added in r166676 based on PR13942 on the basis that tools may need debug information for any executable code/function for some fairly broad/non-specific purposes. It seems to me (as noted in PR14569) that the major/only purpose is in backtraces, which should generally not apply to thunks as they won't appear in the stack themselves. By removing them we fix PR14569 and reduce the size of Clang's debug info. Strangely enough this doesn't seem to have a substantial impact on Clang's self-hosted debug info (at least looking at DWO file size) size at all. Not sure if I failed to test this correctly but I only observed a 0.004% change in DWO file size over Clang+LLVM. With thanks to Dinesh Dwivedi for work on this PR. llvm-svn: 189320
* Use set to create CLANG_ORDER_FILE instead of option which implies a bool value.Michael Gottesman2013-08-271-2/+2
| | | | | | Patch by Edoardo P. <ed0.88.prez@gmail.com>. llvm-svn: 189311
* Show which decls are marked invalid in -ast-dump.Nick Lewycky2013-08-271-0/+3
| | | | llvm-svn: 189306
* Itanium mangler: remove "proposal" comments for manglings that are in theRichard Smith2013-08-271-13/+8
| | | | | | latest draft of the ABI. llvm-svn: 189303
* R600: Add local address pointer size to DataLayoutTom Stellard2013-08-271-0/+1
| | | | llvm-svn: 189302
* Simplify a bit.Rafael Espindola2013-08-261-13/+8
| | | | | | | | | | | | | This follows from computeKeyFunction having: // Template instantiations don't have key functions,see Itanium C++ ABI 5.2.6. // Same behavior as GCC. TemplateSpecializationKind TSK = RD->getTemplateSpecializationKind(); if (TSK == TSK_ImplicitInstantiation || TSK == TSK_ExplicitInstantiationDefinition) return 0; llvm-svn: 189287
* Debug Info: follow-up patch to r189283.Manman Ren2013-08-2610-13/+13
| | | | | | | Thanks David for his suggestion. This commit updates testing cases to have more specific CHECKs. llvm-svn: 189286
* Since r179585, __declspec(property) has gotten special treatment as an ↵Aaron Ballman2013-08-262-2/+1
| | | | | | attribute where it is not processed as part of the typical Sema attribute functionality. Specifying this attribute as being "ignored" because there is no sema handler for it as a Decl attribute, and no AST node generated for it. llvm-svn: 189284
* Debug Info: add an identifier field to DICompositeType.Manman Ren2013-08-2613-33/+33
| | | | | | | Paired with llvm r189282. Update testing cases to handle an extra field for DICompositeType. llvm-svn: 189283
* Use CHECK-DAG in this test.Rafael Espindola2013-08-261-79/+57
| | | | llvm-svn: 189280
* Consumed analyis: Renamed *PStatus to *PInfo.DeLesley Hutchins2013-08-261-48/+48
| | | | | | | | | The change was made for readability, as the PropagationInfo objects don't always contain a status. This is submitted as a separate patch because it touches a lot of lines and I don't want it cluttering up the next patch. Patch by chris.wailes@gmail.com. llvm-svn: 189278
* Simplify/clean up debug info suppression in CodeGenFunctionDavid Blaikie2013-08-268-70/+24
| | | | | | | | | | CodeGenFunction is run on only one function - a new object is made for each new function. I would add an assertion/flag to this effect, but there's an exception: ObjC properties involve emitting helper functions that are all emitted by the same CodeGenFunction object, so such a check is not possible/correct. llvm-svn: 189277
* TestDavid Blaikie2013-08-261-0/+8
| | | | llvm-svn: 189276
* Handle predefined expression for a captured statementWei Pan2013-08-265-0/+53
| | | | | | | | | | | - __func__ or __FUNCTION__ returns captured statement's parent function name, not the one compiler generated. Differential Revision: http://llvm-reviews.chandlerc.com/D1491 Reviewed by bkramer llvm-svn: 189219
* Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.Rafael Espindola2013-08-262-12/+6
| | | | llvm-svn: 189218
* Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64Timur Iskhodzhanov2013-08-262-1/+6
| | | | llvm-svn: 189214
* Teach the Linux toolchain about more modern Gentoo installations of GCCChandler Carruth2013-08-269-8/+44
| | | | | | | | which add another wrinkle to the installation of the libstdc++ headers. Add at least some basic testing of the weirdnesses of Gentoo's layout. llvm-svn: 189212
* clang-format: Fix bug in column-layout formatting.Daniel Jasper2013-08-262-9/+13
| | | | | | | | | | Specific arrangements of comments after trailing commas could confuse the column width calculation, e.g. in: vector<int> x = { a, b, /* some */ /* comment */ }; llvm-svn: 189211
* [-cxx-abi microsoft] Unnamed types are mangled less wrongDavid Majnemer2013-08-261-2/+2
| | | | llvm-svn: 189208
* CodeGen: Unify two implementations of canDevirtualizeMemberFunctionCall.Benjamin Kramer2013-08-253-139/+25
| | | | | | | | | They were mostly copy&paste of each other, move it to CodeGenFunction. Of course the two implementations have diverged over time; the one in CGExprCXX seems to be the more modern one so I picked that one and moved it to CGClass which feels like a better home for it. No intended functionality change. llvm-svn: 189203
* DebugInfo: Emit info for casted decls in template argsDavid Majnemer2013-08-252-2/+21
| | | | | | | | | | | | | | | | | | Summary: Previously the backend wouldn't get to see the underlying GlobalValue that corresponds to the template argument because it would be hidden by a cast at the IR level. Instead strip the pointer casts off of the value until we see the underlying GlobalValue. Reviewers: dblaikie, echristo, majnemer Reviewed By: majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1508 llvm-svn: 189200
* Produce an error when trying to link with -emit-llvm.Rafael Espindola2013-08-253-0/+8
| | | | llvm-svn: 189193
* Tests for ARM aligned access + reserved R9Renato Golin2013-08-252-0/+13
| | | | | | Patch by Jeroen Hofstee. llvm-svn: 189190
* Fix comment.Michael Han2013-08-251-1/+1
| | | | llvm-svn: 189185
* Add gcc ARM flags -munaligned-access / -mno-unaligned-accessRenato Golin2013-08-242-5/+14
| | | | | | | | | | | | | | | | clang already had a mstrict-align which mentiones "Force all memory accesses to be aligned (ARM only)". On gcc arm this is controlled by -munaligned-access / -mno-unaligned-access. Add the gcc versions to the frontend and make -mstrict-align and alias to -mno-unaligned-access and only show it in clang -cc1 -help. Since the default value for unaligned accesses / strict alignment depends on the tripple, both the enable and disable flags are added. If both are set, the no-unaligned-access is used. Patch by Jeroen Hofstee. llvm-svn: 189175
* Add the -ffixed-r9 flag for ARM.Renato Golin2013-08-242-1/+12
| | | | | | | | | | | | This patch adds the -ffixed-r9 flag to clang to instruct llvm to globally preserve the contents of r9. The flag is added to the newly created ARM specific group. While at it, also place marm / mno-thumb in that group. Patch by Jeroen Hofstee. llvm-svn: 189174
* This wasn't headers, just missing namespaces.Benjamin Kramer2013-08-244-8/+7
| | | | | | /me bows head in shame. llvm-svn: 189172
* Add missing includes.Benjamin Kramer2013-08-242-1/+3
| | | | llvm-svn: 189171
* Replace compLocDecl with less_first.Benjamin Kramer2013-08-242-20/+9
| | | | llvm-svn: 189170
* Fix test, make the template type a const pointer.David Majnemer2013-08-241-1/+1
| | | | llvm-svn: 189166
* DebugInfo: Emit info for constant expressions in template argumentsDavid Majnemer2013-08-242-2/+26
| | | | | | | | | | | | | | | | | | | Summary: This allows us to handle the general case where a non-type template argument evaluates to a constant expression which isn't integral or a declaration. This fixes PR16939. Reviewers: dblaikie, rsmith Reviewed By: dblaikie CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1453 llvm-svn: 189165
* CMake: support the LLVM_INSTALL_TOOLCHAIN_ONLY flagHans Wennborg2013-08-241-14/+28
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1498 llvm-svn: 189156
* Add a FIXME.Richard Smith2013-08-231-0/+1
| | | | llvm-svn: 189153
* A clean-up pass, exploring the unification of traversals of class, variable ↵Larisse Voufo2013-08-235-201/+146
| | | | | | and function templates. llvm-svn: 189152
* Add note about following two commands are no longer equivalent.Shuxin Yang2013-08-231-1/+2
| | | | | | | | | - "clang -O3 -flto a.c -c", and - "clang -emit-llvm a.c -c" Thank Rafael for tips. llvm-svn: 189150
* Don't imply -flto with -O4.Rafael Espindola2013-08-235-18/+6
| | | | | | We now saturate at -O3. llvm-svn: 189149
* Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.Shuxin Yang2013-08-231-3/+5
| | | | | | | | | | One step toward differentiating following two commands: clang -O3 -flto a.c -c, and clang -O3 -emit-llvm a.c Thanks many awesome folks for clarifying things. llvm-svn: 189148
* Update now that llvm uses the same feature names as the driver.Rafael Espindola2013-08-231-18/+14
| | | | llvm-svn: 189142
* Consumed analysis: change class name in test cases.DeLesley Hutchins2013-08-232-55/+55
| | | | | | | The name of a class used in the testing files was updated to actually be descriptive. Patch by chris.wailes@gmail.com. llvm-svn: 189132
* Rename CMake variable; this fell out of r189127 somehow.Hans Wennborg2013-08-231-2/+2
| | | | llvm-svn: 189129
* CMake: Don't look for llvm-tblgen when building outside LLVM treeHans Wennborg2013-08-231-11/+9
| | | | | | | | | | | Previously, the CMake build would look for llvm-tblgen to determine if a directory is an LLVM build or install directory. Since we don't want to include llvm-tblgen in the install, look for llvm-config instead, and use that to find llvm-tblgen. Differential Revision: http://llvm-reviews.chandlerc.com/D1483 llvm-svn: 189127
* Comment parsing: fix a bug where a line with whitespace between two paragraphsDmitri Gribenko2013-08-234-11/+57
| | | | | | | | | | would cause us to concatenate these paragraphs into a single one. The no-op whitespace churn in test/Index test happened because these tests don't use the correct approach for testing and are more strict than required for they are testing. llvm-svn: 189126
* Fix indentationDmitri Gribenko2013-08-231-1/+1
| | | | llvm-svn: 189119
* Use CharInfo.h routines in TextComment::isWhitespaceNoCacheDmitri Gribenko2013-08-231-3/+2
| | | | llvm-svn: 189115
* Revise -Wnewline-eof test per feedback from Dmitri.Jordan Rose2013-08-231-6/+6
| | | | llvm-svn: 189113
* Use pop_back_val() instead of both back() and pop_back().Robert Wilhelm2013-08-2330-103/+60
| | | | | | No functionality change intended. llvm-svn: 189112
OpenPOWER on IntegriCloud