[llvm] r355235 - Try to fix Windows bots after r355226.
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 14:28:13 PST 2019
Author: probinson
Date: Fri Mar 1 14:28:13 2019
New Revision: 355235
URL: http://llvm.org/viewvc/llvm-project?rev=355235&view=rev
Log:
Try to fix Windows bots after r355226.
Windows has two path separator characters.
Modified:
llvm/trunk/lib/MC/MCContext.cpp
Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=355235&r1=355234&r2=355235&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Fri Mar 1 14:28:13 2019
@@ -583,7 +583,8 @@ void MCContext::setGenDwarfRootFile(Stri
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);
More information about the llvm-commits
mailing list