Unverified Commit a700a1db authored by Ashay Rane's avatar Ashay Rane
Browse files

[mlir] use shared pointer to prevent vector resizes from destroying ops

The `MapVector` type stores key-value pairs in a vector, which, when
resized, copies the entries and destroys the old ones.  This causes the
underlying operations to be deleted, subsequently causing segfaults.

This patch makes the `mappings` map type refer to a shared pointer
instead, so that resizing the vector doesn't call the operations'
destructors.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D154511
parent 427278d1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment