[mlir][LLVMDebugTranslation] Only insert the location mapping after translation
authorRiver Riddle <riddleriver@gmail.com>
Mon, 27 Apr 2020 23:42:58 +0000 (16:42 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Mon, 27 Apr 2020 23:49:18 +0000 (16:49 -0700)
commit6fab33b20abf28d65b0000cfc3d1254c5e6e250b
treea21e1f2f0ccfe6c717fd95015027a82ea4936054
parenta4ccfd95655d1d9d87e82b6836e91d3478966b58
[mlir][LLVMDebugTranslation] Only insert the location mapping after translation

This fixes an iteration invalidation bug when the map grows beyond capacity and the iterator for the location to translate becomes invalid.
mlir/lib/Target/LLVMIR/DebugTranslation.cpp