This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Extend Mac OS versions to Yosemite
ClosedPublic

Authored by kubamracek on Nov 4 2014, 10:06 AM.

Details

Reviewers
glider
Summary

This also fixes the test/asan/TestCases/Darwin/malloc_zone-protected.cc test failure on OS X 10.10.

Diff Detail

Event Timeline

kubamracek updated this revision to Diff 15773.Nov 4 2014, 10:06 AM
kubamracek retitled this revision from to [compiler-rt] Extend Mac OS versions to Yosemite.
kubamracek updated this object.
kubamracek edited the test plan for this revision. (Show Details)
kubamracek added a subscriber: Unknown Object (MLST).

Also, for the sake of not breaking the ">=" version checks with every OS X release, I think we should have something like:

enum MacosVersion {
  MACOS_VERSION_UNINITIALIZED = 0,
  MACOS_VERSION_UNKNOWN,
  MACOS_VERSION_LEOPARD,
  MACOS_VERSION_SNOW_LEOPARD,
  MACOS_VERSION_LION,
  MACOS_VERSION_MOUNTAIN_LION,
  MACOS_VERSION_MAVERICKS,
  MACOS_VERSION_YOSEMITE,
  MACOS_VERSION_UNKNOWN_NEWER,
};

...
switch (version[0]) {
  case '9': return MACOS_VERSION_LEOPARD;
  case '1': {
    switch (version[1]) {
      case '0': return MACOS_VERSION_SNOW_LEOPARD;
      case '1': return MACOS_VERSION_LION;
      case '2': return MACOS_VERSION_MOUNTAIN_LION;
      case '3': return MACOS_VERSION_MAVERICKS;
      case '4': return MACOS_VERSION_YOSEMITE;
      case '5'...'9': return MACOS_VERSION_UNKNOWN_NEWER;
      default: return MACOS_VERSION_UNKNOWN;
    }
  }
  default: return MACOS_VERSION_UNKNOWN;
}
glider accepted this revision.Nov 5 2014, 7:16 AM
glider added a reviewer: glider.
glider added a subscriber: glider.

LGTM

This revision is now accepted and ready to land.Nov 5 2014, 7:16 AM
kubamracek closed this revision.Nov 5 2014, 11:04 AM

Landed in r221379.