From 2827fda2e00f778dc97b071bf3b875d0e44a46e1 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 1 Mar 2019 22:28:13 +0000 Subject: [PATCH] Try to fix Windows bots after r355226. Windows has two path separator characters. llvm-svn: 355235 --- lib/MC/MCContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp index 7cf4e1da5ac..69e18ed8998 100644 --- a/lib/MC/MCContext.cpp +++ b/lib/MC/MCContext.cpp @@ -583,7 +583,8 @@ void MCContext::setGenDwarfRootFile(StringRef InputFileName, StringRef Buffer) { if (FileName.empty() || FileName == "-") FileName = ""; 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);