summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2019-03-01 22:28:13 +0000
committerPaul Robinson <paul.robinson@sony.com>2019-03-01 22:28:13 +0000
commitd8632c92a718acf4def33035c9260384c1726824 (patch)
tree1644c0ddf176caa5b4f80ad8095e70f71b9fd955 /llvm/lib/MC/MCContext.cpp
parent628472dde2c43d1cbbc29e65c6190d42107fb714 (diff)
downloadbcm5719-llvm-d8632c92a718acf4def33035c9260384c1726824.tar.gz
bcm5719-llvm-d8632c92a718acf4def33035c9260384c1726824.zip
Try to fix Windows bots after r355226.
Windows has two path separator characters. llvm-svn: 355235
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 7cf4e1da5ac..69e18ed8998 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -583,7 +583,8 @@ void MCContext::setGenDwarfRootFile(StringRef InputFileName, StringRef Buffer) {
if (FileName.empty() || FileName == "-")
FileName = "<stdin>";
if (FileName.consume_front(getCompilationDir()))
- FileName.consume_front(llvm::sys::path::get_separator());
+ if (llvm::sys::path::is_separator(FileName.front()))
+ FileName = FileName.drop_front();
assert(!FileName.empty());
setMCLineTableRootFile(
/*CUID=*/0, getCompilationDir(), FileName, Cksum, None);
OpenPOWER on IntegriCloud