Try to fix Windows bots after r355226.

Windows has two path separator characters.

llvm-svn: 355235
This commit is contained in:
Paul Robinson 2019-03-01 22:28:13 +00:00
parent 7ffb265155
commit 2827fda2e0

View File

@ -583,7 +583,8 @@ void MCContext::setGenDwarfRootFile(StringRef InputFileName, StringRef Buffer) {
if (FileName.empty() || FileName == "-") if (FileName.empty() || FileName == "-")
FileName = "<stdin>"; FileName = "<stdin>";
if (FileName.consume_front(getCompilationDir())) 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()); assert(!FileName.empty());
setMCLineTableRootFile( setMCLineTableRootFile(
/*CUID=*/0, getCompilationDir(), FileName, Cksum, None); /*CUID=*/0, getCompilationDir(), FileName, Cksum, None);