summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-3/+2
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Split reinterpret_casts of member pointers out from CK_BitCast; thisJohn McCall2012-02-151-0/+26
| | | | | | | | | | | | | | | | | | | | | is general goodness because representations of member pointers are not always equivalent across member pointer types on all ABIs (even though this isn't really standard-endorsed). Take advantage of the new information to teach IR-generation how to do these reinterprets in constant initializers. Make sure this works when intermingled with hierarchy conversions (although this is not part of our motivating use case). Doing this in the constant-evaluator would probably have been better, but that would require a *lot* of extra structure in the representation of constant member pointers: you'd really have to track an arbitrary chain of hierarchy conversions and reinterpretations in order to get this right. Ultimately, this seems less complex. I also wasn't quite sure how to extend the constant evaluator to handle foldings that we don't actually want to treat as extended constant expressions. llvm-svn: 150551
* Deal with a horrible C++11 special case. If a non-literal type has a constexprRichard Smith2012-02-131-1/+2
| | | | | | | | | | | constructor, and that constructor is used to initialize an object of static storage duration such that all members and bases are initialized by constant expressions, constant initialization is performed. In this case, the object can still have a non-trivial destructor, and if it does, we must emit a dynamic initializer which performs no initialization and instead simply registers that destructor. llvm-svn: 150419
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-071-1/+0
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* Move various diagnostic operator<< overloads out of line and remove includes ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | | of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. llvm-svn: 149781
* Remove constant member pointer support from Expr-based constant emission nowRichard Smith2012-01-171-5/+0
| | | | | | that APValue-based constant emission knows how to emit member pointers. llvm-svn: 148336
* constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,Richard Smith2012-01-141-0/+4
| | | | | | | | | | | | | | | | | | | | APValue::Array and APValue::MemberPointer. All APValue values can now be emitted as constants. Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other entrypoints dealing with constant member pointers are no longer necessary and will be removed in a later change. Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to VarDecl::evaluateValue. This performs caching and deals with the nasty cases in C++11 where a non-const object's initializer can refer indirectly to previously-initialized fields within the same object. Building the intermediate APValue object incurs a measurable performance hit on pathological testcases with huge initializer lists, so we continue to build IR directly from the Expr nodes for array and record types outside of C++11. llvm-svn: 148178
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-2/+2
| | | | llvm-svn: 140478
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-2/+2
| | | | llvm-svn: 135370
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-1/+1
| | | | llvm-svn: 134831
* After some discussion with Doug, we decided that it made a lot more senseJohn McCall2011-04-121-2/+1
| | | | | | | | | for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. llvm-svn: 129331
* More __unknown_anytype work.John McCall2011-04-111-1/+2
| | | | llvm-svn: 129269
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-2/+2
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* More capturing of 'this': implicit member expressions. Getting thatJohn McCall2011-02-031-4/+3
| | | | | | | | | | | right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. llvm-svn: 124785
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-271-2/+4
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* Make the destructor be the 'vtable anchor' of the CGCXXABI class.Anders Carlsson2010-11-281-1/+1
| | | | llvm-svn: 120251
* Move CGCXXABI functions to CGCXXABI.cppAnders Carlsson2010-11-281-0/+155
| | | | llvm-svn: 120250
* Add a CGCXXABI.cpp file.Anders Carlsson2010-11-281-0/+18
llvm-svn: 120249
OpenPOWER on IntegriCloud