It seems like an oversight that this check was not always enabled for
on-device or device simulator targets.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2254 ↗ | (On Diff #162493) | Could we apply De'Morgan's rule here and write that as if (!(isTargetMacOS() && isMacosxVersionLT(10, 9)) { Res |= SanitizerKind::Vptr } I find that a bit easier to read. Is there any particular reason why vptr isn't supported for old macOS versions? There's no mention of ios here which suggests that it's supported on all ios versions which seems like an odd disparity. Perhaps a comment briefly explaining why this is the case would be helpful? |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2254 ↗ | (On Diff #162493) | Sure. MacOS versions older than 10.8 shipped a version of the C++ standard library which is incompatible with the vptr check's implementation (see: https://trac.macports.org/wiki/LibcxxOnOlderSystems). I'll add a comment to that effect. As far as I know, all currently-supported versions of iOS ship libc++. I'll ask around and double-check, just to be safe. |
Address some review feedback.
I'm not sure whether iOS 4 is really supported anymore. There are a handful of code paths in the driver which handle that target, so I've added in a version check for it.