summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-04-12 04:49:00 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-04-12 04:49:00 +0000
commit69cdc901f0d2ac3940b197525ff1e582cf448ef4 (patch)
tree3570211303dbfaf2f0de74ba84750bf89b25fa70 /clang/lib/Frontend/CompilerInvocation.cpp
parent51c220cbeb226dd1c0f03d4fc07f6419df875651 (diff)
downloadbcm5719-llvm-69cdc901f0d2ac3940b197525ff1e582cf448ef4.tar.gz
bcm5719-llvm-69cdc901f0d2ac3940b197525ff1e582cf448ef4.zip
[Modules] Remove darwin specific code to check for SystemVersion.plist
This isn't need anymore and modules options -fbuild-session-file and -fmodules-validate-once-per-build-session already provide a sane mechanism to validate the system headers. rdar://problem/19767523 llvm-svn: 300027
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 271d1ca4f6e..b9c24ab6c00 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2660,29 +2660,6 @@ std::string CompilerInvocation::getModuleHash() const {
code = ext->hashExtension(code);
}
- // Darwin-specific hack: if we have a sysroot, use the contents and
- // modification time of
- // $sysroot/System/Library/CoreServices/SystemVersion.plist
- // as part of the module hash.
- if (!hsOpts.Sysroot.empty()) {
- SmallString<128> systemVersionFile;
- systemVersionFile += hsOpts.Sysroot;
- llvm::sys::path::append(systemVersionFile, "System");
- llvm::sys::path::append(systemVersionFile, "Library");
- llvm::sys::path::append(systemVersionFile, "CoreServices");
- llvm::sys::path::append(systemVersionFile, "SystemVersion.plist");
-
- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> buffer =
- llvm::MemoryBuffer::getFile(systemVersionFile);
- if (buffer) {
- code = hash_combine(code, buffer.get()->getBuffer());
-
- struct stat statBuf;
- if (stat(systemVersionFile.c_str(), &statBuf) == 0)
- code = hash_combine(code, statBuf.st_mtime);
- }
- }
-
return llvm::APInt(64, code).toString(36, /*Signed=*/false);
}
OpenPOWER on IntegriCloud