[compiler-rt][builtins] Ignore the deprecated warning for

CFPropertyListCreateFromXMLData that's used in __isOSVersionAtLeast

I forgot to add the pragmas in r297760.

llvm-svn: 297827
This commit is contained in:
Alex Lorenz 2017-03-15 12:13:20 +00:00
parent 42886c4b47
commit d2677c8ed5
1 changed files with 3 additions and 0 deletions

View File

@ -47,9 +47,12 @@ static void parseSystemVersionPList(void *Unused) {
RTLD_DEFAULT, "CFPropertyListCreateWithData");
/* CFPropertyListCreateWithData was introduced only in macOS 10.6+, so it
* will be NULL on earlier OS versions. */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
typeof(CFPropertyListCreateFromXMLData) *CFPropertyListCreateFromXMLDataFunc =
(typeof(CFPropertyListCreateFromXMLData) *)dlsym(
RTLD_DEFAULT, "CFPropertyListCreateFromXMLData");
#pragma clang diagnostic pop
/* CFPropertyListCreateFromXMLDataFunc is deprecated in macOS 10.10, so it
* might be NULL in future OS versions. */
if (!CFPropertyListCreateWithDataFunc && !CFPropertyListCreateFromXMLDataFunc)