summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2015-02-19 04:03:57 +0000
committerBen Langmuir <blangmuir@apple.com>2015-02-19 04:03:57 +0000
commit07236733bef823361cea231406d4a3f31a5bfb6b (patch)
tree753583bdba81601dd3615f18515156532866db08 /clang/lib/Frontend/CompilerInvocation.cpp
parent3e6490f1e8290c2f1744a923badaa2f362c55d07 (diff)
downloadbcm5719-llvm-07236733bef823361cea231406d4a3f31a5bfb6b.tar.gz
bcm5719-llvm-07236733bef823361cea231406d4a3f31a5bfb6b.zip
Revert adding hostname to module hash
I didn't realize how easily the hostname could change - for example just changing wireless networks seems to prompt it in some cases. Users can always set their own local module cache path to avoid this. This reverts commits r228592, 228594, 228601 and 228613. rdar://19287368 llvm-svn: 229815
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 7413ae2601d..edfee213994 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -39,9 +39,6 @@
#include <memory>
#include <sys/stat.h>
#include <system_error>
-#if LLVM_ON_UNIX
-#include <unistd.h> // for gethostname()
-#endif
using namespace clang;
//===----------------------------------------------------------------------===//
@@ -2028,20 +2025,6 @@ std::string CompilerInvocation::getModuleHash() const {
}
}
-#if LLVM_ON_UNIX
- // The LockFileManager cannot tell when processes from another host are
- // running, so mangle the hostname in to the module hash to separate them.
- char hostname[256];
- hostname[0] = 0;
- if (gethostname(hostname, 255) == 0) {
- // Forcibly null-terminate the result, since POSIX doesn't require that
- // truncation result in an error or that truncated names be null-terminated.
- hostname[sizeof(hostname)-1] = 0;
- code = hash_combine(code, StringRef(hostname));
- }
- // Ignore failures in gethostname() by not including the hostname in the hash.
-#endif
-
return llvm::APInt(64, code).toString(36, /*Signed=*/false);
}
OpenPOWER on IntegriCloud