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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 14:02:51 PDT 2018


tejohnson added inline comments.


================
Comment at: test/Assembler/asm-path-writer.ll:1
+; REQUIRES: system-windows
+; RUN: mkdir -p %t.dir\f4folder
----------------
dexonsmith wrote:
> It's unfortunate that this requires Windows.  Is it possible to check in textual IR file where a `path:` has (properly escaped) backslashes in it, and round-trip it back to assembly?
Right, this is possible since the asm parsing support is also in now. All you should need is a module path and at least one corresponding GV entry. If you use the guid form instead of a name for the gv, it will not require any corresponding IR. I.e. it can just be something like:

^0 = module: (path: "someescapedpath", hash: (0, 0, 0, 0, 0))
^1 = gv: (guid: 17407585008595848568, summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 1)))

(but using an escaped path reproducing the issue)

Then just round trip through llvm-as and llvm-dis and check the output as Peter and Duncan suggested.


https://reviews.llvm.org/D49090





More information about the llvm-commits mailing list