[PATCH] D49090: [ThinLTO] Escape module paths when printing

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 07:45:34 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336908: [ThinLTO] Escape module paths when printing (authored by anng, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D49090?vs=154800&id=155174#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49090

Files:
  llvm/trunk/lib/IR/AsmWriter.cpp
  llvm/trunk/test/Assembler/asm-path-writer.ll


Index: llvm/trunk/lib/IR/AsmWriter.cpp
===================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp
+++ llvm/trunk/lib/IR/AsmWriter.cpp
@@ -2618,8 +2618,9 @@
   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;
Index: llvm/trunk/test/Assembler/asm-path-writer.ll
===================================================================
--- llvm/trunk/test/Assembler/asm-path-writer.ll
+++ llvm/trunk/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)))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49090.155174.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180712/fe987ed7/attachment.bin>


More information about the llvm-commits mailing list