summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
Commit message (Collapse)AuthorAgeFilesLines
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-1917-0/+17
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* DR1511: A const volatile global does not implicitly get internal linkage like aRichard Smith2012-10-191-0/+4
| | | | | | const non-volatile global does. llvm-svn: 166269
* Fix handling of the regparm attribute in the presence of classes with copyRafael Espindola2012-10-191-0/+21
| | | | | | | | | | | | | constructors. When I first moved regparm support to TargetInfo.cpp I tried to isolate it in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the code around and check for regparm at the end of the decision tree. Without this refactoring classifyArgumentTypeWithReg would have to duplicate the logic about when to use non-byval indirect arguments. llvm-svn: 166266
* Add a new option for and disable column number information as thereEric Christopher2012-10-182-2/+2
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* DR1442: In a range-based for statement, namespace 'std' is not an associatedRichard Smith2012-10-181-6/+4
| | | | | | namespace. llvm-svn: 166194
* DR1535: only potentially-evaluated typeid expressions are disallowed in constantRichard Smith2012-10-171-3/+5
| | | | | | expressions, not *any* typeid on a polymorphic class type. llvm-svn: 166156
* Revert r158009 since there are some uses of artificial functions inEric Christopher2012-10-174-24/+12
| | | | | | debug info. llvm-svn: 166109
* PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.David Blaikie2012-10-161-1/+12
| | | | | | | | This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't present in 4.4 - not sure when it got added, but you'll need something with that function available for this to work). llvm-svn: 166069
* Test pure virtual vtable entries in the Itanium ABI.David Blaikie2012-10-161-0/+11
| | | | | | (original functionality committed in r99807, refactored in r160373) llvm-svn: 166059
* Note deleted functions when dumping vtables.David Blaikie2012-10-161-0/+21
| | | | llvm-svn: 166056
* At -O0, emit an @llvm.trap() call at the end of a value-returning function whichRichard Smith2012-10-151-3/+9
| | | | | | fails to return a value, to make debugging this issue easier. llvm-svn: 165914
* Handle gnu_inline in c++ in a gcc compatible way. Original patch by TobiasRafael Espindola2012-10-111-0/+9
| | | | | | Grosser. llvm-svn: 165720
* clang/test/CodeGenCXX/microsoft-uuidof.cpp: Fix for -Asserts.NAKAMURA Takumi2012-10-111-6/+6
| | | | llvm-svn: 165712
* Add codegen support for __uuidof().Nico Weber2012-10-112-0/+85
| | | | llvm-svn: 165710
* Fix PR 11709: Change the definition of va_list to meet AAPCS requirementLogan Chien2012-10-101-0/+44
| | | | | | | | | | | | | AAPCS ABI Section 7.1.4 [1] specifies that va_list should be defined as struct __va_list { void *__ap;}; And in C++, it is defined in namespace std. [1] http://infocenter.arm.com/help/topic /com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf Patch by Weiming Zhao. llvm-svn: 165609
* -fcatch-undefined-behavior: emit calls to the runtime library whenever one ↵Richard Smith2012-10-091-2/+2
| | | | | | of the checks fails. llvm-svn: 165536
* Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman2012-10-051-1/+15
| | | | | | PR14029, clang part. llvm-svn: 165289
* If we flow off the end of a value-returning function:Richard Smith2012-10-042-0/+12
| | | | | | | | - outside C++, return undef (behavior is not undefined unless the value is used) - in C++, with -fcatch-undefined-behavior, perform an appropriate trap - in C++, produce an 'unreachable' (behavior is undefined immediately) llvm-svn: 165273
* When mangling an APSInt with the ms abi, make sure to look at all nibbles.Nico Weber2012-10-031-0/+9
| | | | | | Currently, it's ignored if the number of set bits isn't divisible by 4. llvm-svn: 165116
* Allowing individual targets to determine whether a given calling convention ↵Aaron Ballman2012-10-021-0/+2
| | | | | | | | is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs. Fixes PR13782 llvm-svn: 165015
* Mark two Clang tests as passing on ARMNico Weber2012-10-011-1/+1
| | | | | | | Also move one of them from grep to FileCheck. Patch from Joey Gouly <joey.gouly@arm.com>! llvm-svn: 164929
* CodeGen: Copy tail padding when we're not dealing with a trivial copy assign ↵Benjamin Kramer2012-09-301-0/+89
| | | | | | | | | | or move assign operator. This fixes a regression from r162254, the optimizer has problems reasoning about the smaller memcpy as it's often not safe to widen a store but making it smaller is. llvm-svn: 164917
* PR13941: Mark all virtual functions as unnamed_addr. It's not possible toRichard Smith2012-09-282-3/+10
| | | | | | | observe their addresses (taking their address gives the vtable slot) so we are free to merge their definitions. llvm-svn: 164864
* Fix an edge case of mangling involving the combination of a lambda and typeid.Eli Friedman2012-09-261-0/+13
| | | | | | | | | | | | | typeid (and a couple other non-standard places where we can transform an unevaluated expression into an evaluated expression) is special because it introduces an an expression evaluation context, which conflicts with the mechanism to compute the current lambda mangling context. PR12123. I would appreciate if someone would double-check that we get the mangling correct with this patch. llvm-svn: 164658
* Fix the AST representation for non-type template arguments to encodeEli Friedman2012-09-262-2/+5
| | | | | | | | | | | | enough information so we can mangle them correctly in cases involving dependent parameter types. (This specifically impacts cases involving null pointers and cases involving parameters of reference type.) Fix the mangler to use this information instead of trying to scavenge it out of the parameter declaration. <rdar://problem/12296776>. llvm-svn: 164656
* When performing a ::delete of an object with a virtual destructor,John McCall2012-09-251-6/+17
| | | | | | | | | | | | | | be sure to delete the complete object pointer, not the original pointer. This is necessary if the base being deleted is at a non-zero offset in the complete object. This is only required for objects with virtual destructors because deleting an object via a base-class subobject when the base does not have a virtual destructor is undefined behavior. Noticed while reviewing the last four years of cxx-abi-dev activity. llvm-svn: 164597
* clang/test/CodeGenCXX/microsoft-*: Fix for -Asserts.NAKAMURA Takumi2012-09-254-14/+13
| | | | llvm-svn: 164594
* Implement Mike Herrick's proposed noexcept mangling.John McCall2012-09-251-0/+7
| | | | llvm-svn: 164593
* In the MS ABI, ctors return 'this'. Patch by Dmitry Sokolov.John McCall2012-09-253-10/+14
| | | | llvm-svn: 164592
* Fix for r163013 regression and further __interface enhancement.John McCall2012-09-251-0/+43
| | | | | | Patch by Andy Gibbs! llvm-svn: 164590
* During jump-scope checking, build an ExprWithCleanups immediatelyJohn McCall2012-09-251-0/+1
| | | | | | | | | | | | into the enclosing scope; this is a more accurate model but is (I believe) unnecessary in my test case due to other flaws. However, one of those flaws is now intentional: blocks which appear in return statements can be trivially observed to not extend in lifetime past the return, and so we can allow a jump past them. Do the necessary magic in IR-generation to make this work. llvm-svn: 164589
* Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they getRafael Espindola2012-09-211-2/+17
| | | | | | | attributes like uwtable. Without uwtable a stack unwinder would be unable to go past the thunks. llvm-svn: 164411
* Handle a captured this for the debug information as well.Eric Christopher2012-09-191-0/+15
| | | | llvm-svn: 164253
* Fix ABI dependent tests by providing an explicit target triple.David Blaikie2012-09-192-4/+4
| | | | | | Patch by Joey Gouly. llvm-svn: 164239
* Test for r164186.Eli Friedman2012-09-191-0/+14
| | | | llvm-svn: 164187
* Fix thunk emission for covariant virtual functions in cases which requireEli Friedman2012-09-141-0/+26
| | | | | | both a virtual and a non-virtual offset. PR13832. llvm-svn: 163866
* Revert r163829. The world (or libstdc++, at least) is not ready.Richard Smith2012-09-131-2/+2
| | | | llvm-svn: 163846
* Remove speculative fix for C++ core issue 1407, since it was resolved as NAD.Richard Smith2012-09-131-2/+2
| | | | llvm-svn: 163829
* Reapply:Eric Christopher2012-09-121-1/+1
| | | | | | | | | | | Make clang emit a flag for DW_AT_object_pointer for the artificial args where it should (implicit first arguments). FileCheck-ize a test as well and update tests to take into account the object pointer flag. rdar://9797999 llvm-svn: 163755
* Revert "Make clang emit a flag for DW_AT_object_pointer for the artificial"Eric Christopher2012-09-121-1/+1
| | | | | | this should be done on the subprogram, not the variable. llvm-svn: 163733
* clang/test: [PR8833] Introduce the feature "LP64" to suppress ↵NAKAMURA Takumi2012-09-122-0/+3
| | | | | | | | LLP64-incompatible tests. I think some of them could be rewritten to fit also LLP64. llvm-svn: 163699
* Make clang emit a flag for DW_AT_object_pointer for the artificialEric Christopher2012-09-121-1/+1
| | | | | | | | | | args where it should (implicit first arguments). FileCheck-ize a test as well and update tests to take into account the object pointer flag. rdar://9797999 llvm-svn: 163668
* Provide fixed target triples to make test results consistent across ARM hosts.David Blaikie2012-09-106-10/+10
| | | | | | Patch by David Tweed, review by myself and John McCall. llvm-svn: 163564
* Follow-up on r163110 - forgot to commit some new tests...Timur Iskhodzhanov2012-09-031-0/+78
| | | | llvm-svn: 163111
* Fix PR13444 - wrong mangling of "const char * const *" and friends with ↵Timur Iskhodzhanov2012-09-032-9/+29
| | | | | | "-cxx-abi microsoft" llvm-svn: 163110
* Change the representation of builtin functions in the ASTEli Friedman2012-08-311-12/+0
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* Fix a CodeGen bug where we would skip zero-initialization forEli Friedman2012-08-251-0/+10
| | | | | | array new with a non-trivial constructor. Pointed out in PR13380. llvm-svn: 162643
* Fix the CC-matching logic for instance methods in the MS ABI.John McCall2012-08-251-0/+47
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162639
* Fix the mangling of function pointers in the MS ABI.John McCall2012-08-252-0/+76
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162638
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-251-0/+20
| | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. llvm-svn: 162634
OpenPOWER on IntegriCloud