Skip to content
  1. Mar 23, 2011
    • Douglas Gregor's avatar
      Implement a new 'availability' attribute, that allows one to specify · 20b2ebd7
      Douglas Gregor authored
      which versions of an OS provide a certain facility. For example,
      
        void foo()
        __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));
      
      says that the function "foo" was introduced in 10.2, deprecated in
      10.4, and completely obsoleted in 10.6. This attribute ties in with
      the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
      we want to deploy back to Mac OS X 10.1). There are several concrete
      behaviors that this attribute enables, as illustrated with the
      function foo() above:
      
        - If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
          will result in a deprecation warning, as if we had placed
          attribute((deprecated)) on it (but with a better diagnostic)
        - If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
          will result in an "unavailable" warning (in C)/error (in C++), as
          if we had placed attribute((unavailable)) on it
        - If we choose a deployment target prior to 10.2, foo() is
          weak-imported (if it is a kind of entity that can be weak
          imported), as if we had placed the weak_import attribute on it.
      
      Naturally, there can be multiple availability attributes on a
      declaration, for different platforms; only the current platform
      matters when checking availability attributes.
      
      The only platforms this attribute currently works for are "ios" and
      "macosx", since we already have -mxxxx-version-min flags for them and we
      have experience there with macro tricks translating down to the
      deprecated/unavailable/weak_import attributes. The end goal is to open
      this up to other platforms, and even extension to other "platforms"
      that are really libraries (say, through a #pragma clang
      define_system), but that hasn't yet been designed and we may want to
      shake out more issues with this narrower problem first.
      
      Addresses <rdar://problem/6690412>.
      
      As a drive-by bug-fix, if an entity is both deprecated and
      unavailable, we only emit the "unavailable" diagnostic.
      
      llvm-svn: 128127
      20b2ebd7
  2. Mar 22, 2011
  3. Mar 18, 2011
  4. Mar 17, 2011
  5. Mar 14, 2011
  6. Mar 09, 2011
  7. Mar 07, 2011
    • Devang Patel's avatar
      DebugInfo can be enabled or disabled at function level (e.g. using an... · d6ffebb0
      Devang Patel authored
      DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not.
      
      llvm-svn: 127165
      d6ffebb0
    • Devang Patel's avatar
      Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience. · e65982c8
      Devang Patel authored
      21 int main() {
      22  A a;
      
      For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr.
      
      This fixes ostream-defined.exp regression from gdb testsuite.
      
      llvm-svn: 127164
      e65982c8
  8. Mar 05, 2011
  9. Feb 22, 2011
  10. Feb 19, 2011
    • John McCall's avatar
      Warn about code that uses variables and functions with internal linkage · 83779675
      John McCall authored
      without defining them.  This should be an error, but I'm paranoid about
      "uses" that end up not actually requiring a definition.  I'll revisit later.
      
      Also, teach IR generation to not set internal linkage on variable
      declarations, just for safety's sake.  Doing so produces an invalid module
      if the variable is not ultimately defined.
      
      Also, fix several places in the test suite where we were using internal
      functions without definitions.
      
      llvm-svn: 126016
      83779675
  11. Feb 15, 2011
    • John McCall's avatar
      Assorted cleanup: · e3dc1707
      John McCall authored
        - Have CGM precompute a number of commonly-used types
        - Have CGF copy that during initialization instead of recomputing them
        - Use TBAA info when initializing a parameter variable
        - Refactor the scalar ++/-- code
      
      llvm-svn: 125562
      e3dc1707
  12. Feb 11, 2011
  13. Feb 09, 2011
  14. Feb 08, 2011
  15. Feb 05, 2011
  16. Feb 04, 2011
  17. Feb 03, 2011
  18. Feb 01, 2011
  19. Jan 30, 2011
    • Anders Carlsson's avatar
      When building with optimizations, emit vtables where the key is not in the · a03f3a85
      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.
      
      llvm-svn: 124565
      a03f3a85
  20. Jan 29, 2011
  21. Jan 24, 2011
  22. Jan 22, 2011
  23. Jan 18, 2011
Loading