aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackMaps.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-03-19 19:18:22 +0000
committerNico Weber <nicolasweber@gmx.de>2015-03-19 19:18:22 +0000
commit0055a19926b7b23cfc49b5b645769698ba5aa129 (patch)
tree80013c2d762e266554b7c5e8c0e0b25640bf6598 /llvm/lib/CodeGen/StackMaps.cpp
parentf3d3db65de4e2937cd2efa3de984b2d35c9ec5c0 (diff)
downloadllvm-0055a19926b7b23cfc49b5b645769698ba5aa129.zip
llvm-0055a19926b7b23cfc49b5b645769698ba5aa129.tar.gz
llvm-0055a19926b7b23cfc49b5b645769698ba5aa129.tar.bz2
Add -Wpartial-availability.
This warns when using decls that are not available on all deployment targets. For example, a call to - (void)ppartialMethod __attribute__((availability(macosx,introduced=10.8))); will warn if -mmacosx-version-min is set to less than 10.8. To silence the warning, one has to explicitly redeclare the method like so: @interface Whatever(MountainLionAPI) - (void)ppartialMethod; @end This way, one cannot accidentally call a function that isn't available everywhere. Having to add the redeclaration will hopefully remind the user to add an explicit respondsToSelector: call as well. Some projects build against old SDKs to get this effect, but building against old SDKs suppresses some bug fixes -- see http://crbug.com/463171 for examples. The hope is that SDK headers are annotated well enough with availability attributes that new SDK + this warning offers the same amount of protection as using an old SDK. llvm-svn: 232750
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
0 files changed, 0 insertions, 0 deletions