Skip to content
Snippets Groups Projects
  1. Feb 10, 2011
  2. Feb 09, 2011
  3. Feb 08, 2011
  4. Feb 07, 2011
  5. Feb 06, 2011
  6. Feb 05, 2011
  7. Feb 04, 2011
  8. Feb 03, 2011
  9. Feb 02, 2011
  10. Feb 01, 2011
  11. Jan 31, 2011
  12. Jan 30, 2011
    • Anders Carlsson's avatar
      When building with optimizations, emit vtables where the key is not in the · 6d7f8473
      Anders Carlsson authored
      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
      6d7f8473
  13. Jan 29, 2011
Loading