651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
a3f55b026fc24db6a4e275a8e4110d071122b99d |
|
04-Sep-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't pass -O0 to clang_cc1, it is the default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
28c73f120f89681aad616556564cb5892baf2bcb |
|
04-Sep-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use -O0 in this test too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
889a6758554c27ca4cf93502cfb5dc788cb47990 |
|
03-Sep-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't emit an available_externally vtable pointing to linkonce_odr funcs. This fixes pr13124. From the discussion at http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html we know that we cannot make funcions in a weak_odr vtable also weak_odr. They should remain linkonce_odr. The side effect is that we cannot emit a available_externally vtable unless we also emit a copy of the function. This also has an issue: If codegen is going to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks like sema cannot be more aggressive at marking functions used because of vtables. This leaves us with a few unpleasant options: * Marking functions in vtables used if possible. This sounds a bit sloppy, so we should avoid it. * Producing available_externally vtables only when all the functions in it are already used or weak_odr. This would cover cases like -------------------- struct foo { virtual ~foo(); }; struct bar : public foo { virtual void zed(); }; void f() { foo *x(new bar); delete x; } void g(bar *x) { x->~bar(); // force the destructor to be used } -------------------------- and ---------------------------------- template<typename T> struct bar { virtual ~bar(); }; template<typename T> bar<T>::~bar() { } // make the destructor weak_odr instead of linkonce_odr extern template class bar<int>; void f() { bar<int> *x(new bar<int>); delete x; } ---------------------------- These look like corner cases, so it is unclear if it is worth it. * And finally: Just nuke this optimization. That is what this patch implements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
93ab6bf534fb6c26563c00f28a8fc5581bb71dfd |
|
15-Aug-2013 |
Stephen Lin <stephenwlin@gmail.com> |
CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
d5617eeafc93209a26b9f88276c88cf997c3a0a7 |
|
25-Jan-2013 |
John McCall <rjmccall@apple.com> |
The standard ARM C++ ABI dictates that inline functions are never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
976d91177a83101434c1985ea3b14f682f0f38c4 |
|
06-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Add another test that we can fully devirtualize now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
bbfd5babab059af14eed20b63b2aabedaa6a6ac7 |
|
05-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to GetOrCreateLLVMFunction so that we won't assert when building a thunk for an implicit virtual member function that is not marked used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
1faa89f9c619e4b2411fab4af7e22ee7a2bd9009 |
|
05-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Re-land r124768, with a fix for PR9130. We now emit everything except unused implicit virtual member functions when building the vtable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
01de7a44cea9f77cbcda65faad8edc8b48a3b617 |
|
03-Feb-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 124768. This reopens PR99114, but that one at least can be avoided with an #include. PR9130 cannot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
aedd9d5ad3cc776fd61457050bcd54cac4c5ea66 |
|
03-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Don't try to mark virtual members referenced for classes where the key function is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
6d7f8473cd6e967b3676948894ce72472102f9cb |
|
30-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
When building with optimizations, emit vtables where the key is not in the current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/vtable-available-externally.cpp
|