Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ing

nonexistent Darwin-specific files on every module build.

llvm-svn: 182331
This commit is contained in:
Richard Smith
2013-05-20 23:17:08 +00:00
parent 68ae91cf83
commit fcf713ac24
2 changed files with 6 additions and 1 deletions

View File

@@ -1690,6 +1690,7 @@ std::string CompilerInvocation::getModuleHash() const {
hsOpts.UseStandardCXXIncludes,
hsOpts.UseLibcxx);
#ifdef __APPLE__
// Darwin-specific hack: if we have a sysroot, use the contents and
// modification time of
// $sysroot/System/Library/CoreServices/SystemVersion.plist
@@ -1710,6 +1711,7 @@ std::string CompilerInvocation::getModuleHash() const {
code = hash_combine(code, statBuf.st_mtime);
}
}
#endif
return llvm::APInt(64, code).toString(36, /*Signed=*/false);
}