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 628472dde2
commit d8632c92a7
1 changed files with 2 additions and 1 deletions

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);