[mlir][AsmPrinter] Properly escape strings when printing locations
authorRiver Riddle <riddleriver@gmail.com>
Sat, 16 Jan 2021 00:55:32 +0000 (16:55 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Sat, 16 Jan 2021 01:14:57 +0000 (17:14 -0800)
commit2a27a9819a1e3371e3e08d7fbad6235cf50d336d
tree44b3a829c639c83bd13221a12231a90757fcfdb0
parent3afbfb4145bea3796f1137c377774848093c3435
[mlir][AsmPrinter] Properly escape strings when printing locations

This fixes errors when location strings contains newlines, or other non-ascii characters.

Differential Revision: https://reviews.llvm.org/D94847
mlir/lib/IR/AsmPrinter.cpp
mlir/test/IR/locations.mlir