Index: tools/llvm-dwarfdump/Statistics.cpp =================================================================== --- tools/llvm-dwarfdump/Statistics.cpp +++ tools/llvm-dwarfdump/Statistics.cpp @@ -547,12 +547,16 @@ VarWithSrcLoc += Stats.NumVarSourceLocations; } + // Windows path may contain special characters. + std::string FileFullPath = Filename.str(); + std::replace(FileFullPath.begin(), FileFullPath.end(), '\\', '/'); + // Print summary. OS.SetBufferSize(1024); OS << "{\"version\":" << Version; LLVM_DEBUG(llvm::dbgs() << "Variable location quality metrics\n"; llvm::dbgs() << "---------------------------------\n"); - printDatum(OS, "file", Filename.str()); + printDatum(OS, "file", FileFullPath); printDatum(OS, "format", FormatName); printDatum(OS, "source functions", NumFunctions); printDatum(OS, "source functions with location", NumFuncsWithSrcLoc);