diff options
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 5 | ||||
-rw-r--r-- | llvm/test/Assembler/asm-path-writer.ll | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 630295a9bd0..99a25a723b4 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -2618,8 +2618,9 @@ void AssemblyWriter::printModuleSummaryIndex() { unsigned i = 0; for (auto &ModPair : moduleVec) { Out << "^" << i++ << " = module: ("; - Out << "path: \"" << ModPair.first << "\""; - Out << ", hash: ("; + Out << "path: \""; + printEscapedString(ModPair.first, Out); + Out << "\", hash: ("; FieldSeparator FS; for (auto Hash : ModPair.second) Out << FS << Hash; diff --git a/llvm/test/Assembler/asm-path-writer.ll b/llvm/test/Assembler/asm-path-writer.ll new file mode 100644 index 00000000000..f2263956672 --- /dev/null +++ b/llvm/test/Assembler/asm-path-writer.ll @@ -0,0 +1,6 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +; CHECK: ^0 = module: (path: ".\5Cf4folder\5Cabc.o", hash: (0, 0, 0, 0, 0)) + +^0 = module: (path: ".\5Cf4folder\5Cabc.o", hash: (0, 0, 0, 0, 0)) +^1 = gv: (guid: 15822663052811949562, summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2))) |