summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Path.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-12 00:05:49 +0000
committerZachary Turner <zturner@google.com>2015-02-12 00:05:49 +0000
commit36f807c8603b170ad71e0f15ec0279aa1c40384c (patch)
treee36f3ff6de13e33bdb2402ca9be7fd1f9cdc0f36 /llvm/lib/Support/Path.cpp
parentbbcdb9da19547728bc968e7b93c74fbfcc9c9aef (diff)
downloadbcm5719-llvm-36f807c8603b170ad71e0f15ec0279aa1c40384c.tar.gz
bcm5719-llvm-36f807c8603b170ad71e0f15ec0279aa1c40384c.zip
Revert "Change Path::filename_pos() to skip the drive letter."
This reverts commit 228874. For some reason users reported seeing Clang taking up 25+GB of memory and bringing down machines with this change. Reverting until we figure it out. llvm-svn: 228890
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r--llvm/lib/Support/Path.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp
index 3e0a4f5aab9..abec7b9dd22 100644
--- a/llvm/lib/Support/Path.cpp
+++ b/llvm/lib/Support/Path.cpp
@@ -98,11 +98,8 @@ namespace {
size_t pos = str.find_last_of(separators, str.size() - 1);
#ifdef LLVM_ON_WIN32
- if (pos == StringRef::npos) {
- // Skip the drive letter, if one exists.
- if (str.size() >= 2 && str[1] == ':')
- pos = 2;
- }
+ if (pos == StringRef::npos)
+ pos = str.find_last_of(':', str.size() - 2);
#endif
if (pos == StringRef::npos ||
OpenPOWER on IntegriCloud