- Mar 21, 2016
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263936 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263934 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
Implement lambda capture of *this by copy. For e.g.: struct A { int d = 10; auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; } }; auto L = A{}.foo(); // A{}'s lifetime is gone. // Below is still ok, because *this was captured by value. assert(L(10) == 20); assert(L(100) == 120); If the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined. Implementation Strategy: - amend the parser to accept *this in the lambda introducer - add a new king of capture LCK_StarThis - teach Sema::CheckCXXThisCapture to handle by copy captures of the enclosing object (i.e. *this) - when CheckCXXThisCapture does capture by copy, the corresponding initializer expression for the closure's data member direct-initializes it thus making a copy of '*this'. - in codegen, when assigning to CXXThisValue, if *this was captured by copy, make sure it points to the corresponding field member, and not, unlike when captured by reference, what the field member points to. - mark feature as implemented in svn Much gratitude to Richard Smith for his carefully illuminating reviews! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263921 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 19, 2016
-
-
Manman Ren authored
This makes sure we don't generate a lot of code to spill/reload CSRs when calling tls_init from the access functions. This helps performance when tls_init is not inlined into the access functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263854 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 17, 2016
-
-
Reid Kleckner authored
This reverts commit r263738. This appears to cause a failure in CXX/temp/temp.decls/temp.friend/p1.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263740 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Summary: ...as that is apparently what MSVC does Reviewers: rnk Patch by Stephan Bergmann Differential Revision: http://reviews.llvm.org/D15267 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263738 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 15, 2016
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263505 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 14, 2016
-
-
Peter Collingbourne authored
Should fix ARM bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263477 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263469 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
This marks virtual function declarations, as well as runtime library functions __cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This will allow us to correctly form relative references to them from vtables in the relative vtable ABI. Differential Revision: http://reviews.llvm.org/D18071 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263464 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
Revert "Recommitted r261634 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26715 at r263379." This reverts commit r263425. Breaks self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263436 91177308-0d34-0410-b5e6-96231b3b80d8
-
Amjad Aboud authored
After fixing PR26715 at r263379. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263425 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 13, 2016
-
-
Mehdi Amini authored
Summary: This flag is enabled by default in the driver when NDEBUG is set. It is forwarded on the LLVMContext to discard all value names (but GlobalValue) for performance purpose. This an improved version of D18024 Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18127 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263394 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 08, 2016
-
-
Richard Smith authored
P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262963 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 07, 2016
-
-
David Majnemer authored
Really long symbols are hashed using MD5 and prefixed/suffixed with the usual sigils. There is an additional reason beyond the usual compatibility with MSVC, it is important to keep COFF symbols shorter than 0xFFFF because the CodeView debugging format has a maximum symbol/record size of 0xFFFF. There are some quirks worth noting: - Some mangled names reference other entities which are mangled separately. A quick example: int I; template <int *> struct S {}; S<I> s; In this case, the mangling for 's' doesn't depend directly on the mangling for 'I'. While 's' would need an MD5 hash if 'I' also needed one, the hash for 's' applied to the fully realized mangled name. In other words, the mangled name for 's' will not depend on the MD5 of the mangled name for 'I'. - Some mangled names, like the venerable CatchableType, embed the MD5 verbatim. - Finally, the complete object locator is handled as a special case. A complete object locators are mangled exactly like a VFTable except for a small deviation in the prefix sigils. However, complete object locators for hashed vftables result in a complete object locator whose name is identical to the vftable except for an additional suffix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262818 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 02, 2016
-
-
Reid Kleckner authored
Summary: This change just adds tests for some corner cases of dllimport/dllexport, primarily for some static methods. We plan to enable dllimport/dllexport support for the PS4, and these additional tests are for points we previously were testing internally. -Warren Ristow SN Systems - Sony Computer Entertainment Group Reviewers: rnk Subscribers: silvas Differential Revision: http://reviews.llvm.org/D17775 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262442 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 01, 2016
-
-
John McCall authored
ARC ownership-convention function type modifications. According to the Itanium ABI, vendor extended qualifiers are supposed to be mangled in reverse-alphabetical order before any CVR qualifiers. The ARC function type conventions are plausibly order-significant (they are associated with the function type), which permits us to ignore the need to correctly inter-order them with any other vendor qualifiers on the parameter and return types. Implementing these rules correctly is technically an ABI break. Apple is comfortable with the risk of incompatibility here for the ARC features, and I believe that address-space qualification is still uncommon enough to allow us to adopt the conforming rule without serious risk. Still, targets which make heavy use of address space qualification may want to revert to the non-conforming order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262414 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 29, 2016
-
-
David Majnemer authored
Functions with an explicit exception specification have their behavior dictated by the specification. The additional /EHc behavior only comes into play if no exception specification is given. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262198 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 26, 2016
-
-
Reid Kleckner authored
Relands r260194 with a fix. If we have a template that transitions from an extern template to an explicitly instantiated dllexport template, we would add that class to the delayed exported class list without flushing it. For explicit instantiations, we can just flush the list of delayed classes immediately. We don't have to worry about the bug fixed in r260194 in this case because explicit instantiations can only occur at file and namespace scope. Fixes PR26490. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262056 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 24, 2016
-
-
Peter Collingbourne authored
This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261767 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Calls to the terminate handler must be annotated within the exception region they are within. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261751 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 23, 2016
-
-
Hans Wennborg authored
r261634 and r261633 seems to have caused PR26715. r261657 depends on the former two. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261670 91177308-0d34-0410-b5e6-96231b3b80d8
-
Amjad Aboud authored
Differential Revision: http://reviews.llvm.org/D15977 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261634 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 22, 2016
-
-
David Majnemer authored
We gave a VBTable dllimport storage class and external linkage while also providing an initializer. An initializer is only valid if the VBTable has available_externally linkage. Fix this by setting the linkage to available_externally in situ while generating the initializer. This fixes PR26686. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261535 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261534 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 20, 2016
-
-
David Majnemer authored
This flag no longer controls any behavior inside of clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261423 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 11, 2016
-
-
David Majnemer authored
This reverts commit r260449. We would supress our emission of vftable definitions if we thought another translation unit would provide the definition because we saw an explicit instantiation declaration. This is not the case with dllimport, we want to synthesize a definition of the vftable regardless. This fixes PR26569. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260548 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Something changed the inference of nonnull. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260472 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 10, 2016
-
-
Hans Wennborg authored
This caused the compiler to fail with "invalid linkage type for global declaration" (PR26569). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260449 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Referencing a dllimported vtable is impossible in a constexpr constructor. It would be friendlier to C++ programmers if we synthesized a copy of the vftable which referenced imported virtual functions. This would let us initialize the object in a way which preserves both the intent to import functionality from another DLL while also making constexpr work. Differential Revision: http://reviews.llvm.org/D17061 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260388 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Lebar authored
Summary: This isn't a FileCheck directive; it does nothing. Reviewers: jroelofs Subscribers: cfe-commits, majnemer Differential Revision: http://reviews.llvm.org/D17051 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260334 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 09, 2016
-
-
Reid Kleckner authored
This reverts commit r260194. It caused PR26549. There's probably a better way to do this also. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260241 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Fixes PR26490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260194 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 07, 2016
-
-
David Majnemer authored
A dllimport'd vtable always points one past the RTTI data, this means that the initializer will never end up referencing the data. Our emission is a harmless waste. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260062 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 06, 2016
-
-
Adrian Prantl authored
It is possible for enums to be created as part of their own declcontext. We need to cache a placeholder to avoid the type being created twice before hitting the cache. <rdar://problem/24493203> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259975 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 05, 2016
-
-
Saleem Abdulrasool authored
Because the Decl is explicitly passed as nullptr further up the call chain, it is possible to invoke isa on a nullptr, which will assert. Guard against the nullptr. Take the opportunity to reuse the helper method rather than re-implementing this logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259874 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 03, 2016
-
-
Evgeniy Stepanov authored
Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of the vtable pointer against the set of all known vtable addresses and lets the runtime handler know if it is safe to inspect the vtable. http://reviews.llvm.org/D16823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259716 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
C++ ABI library for the same set of types for which we expect the C++ ABI library to provide the RTTI. Specifically: 1) __int128 and unsigned __int128 are now emitted into the ABI library. We always expected them to be there but never actually made sure to emit them. 2) Do not expect OpenCL builtin types to have type info in the C++ ABI library. Neither libc++abi nor libstdc++ puts them there when built with either GCC or Clang. This matches GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259616 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 02, 2016
-
-
Denis Zobnin authored
Allow "mode" attribute for enum types, except for vector modes, for compatibility with GCC. Support "mode" attribute with dependent types. Differential Revision: http://reviews.llvm.org/D16219 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259497 91177308-0d34-0410-b5e6-96231b3b80d8
-
Denis Zobnin authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259492 91177308-0d34-0410-b5e6-96231b3b80d8
-