diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 7f47849..cf3c38c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -849,10 +849,11 @@ static std::string flattenCommandLine(ArrayRef<const char *> Args, continue; } if (!LastArg.empty()) - FlatCmdLine += " "; + OS << " "; llvm::sys::printArg(OS, Arg, /*Quote=*/true); LastArg = Arg; } + OS.flush(); return FlatCmdLine; } @@ -876,6 +877,9 @@ void CodeViewDebug::emitBuildInfo() { getStringIdTypeIdx(TypeTable, MainSourceFile->getDirectory()); BuildInfoArgs[BuildInfoRecord::SourceFile] = getStringIdTypeIdx(TypeTable, MainSourceFile->getFilename()); + // FIXME: PDB is intentionally blank unless we implement /Zi type servers. + BuildInfoArgs[BuildInfoRecord::TypeServerPDB] = + getStringIdTypeIdx(TypeTable, ""); if (Asm->TM.Options.MCOptions.Argv0 != nullptr) { BuildInfoArgs[BuildInfoRecord::BuildTool] = getStringIdTypeIdx(TypeTable, Asm->TM.Options.MCOptions.Argv0); @@ -883,7 +887,6 @@ void CodeViewDebug::emitBuildInfo() { TypeTable, flattenCommandLine(Asm->TM.Options.MCOptions.CommandLineArgs, MainSourceFile->getFilename())); } - // FIXME: PDB is intentionally blank unless we implement /Zi type servers. BuildInfoRecord BIR(BuildInfoArgs); TypeIndex BuildInfoIndex = TypeTable.writeLeafType(BIR); |