They point into the DIType type system, so they need to be stripped as well.
rdar://75341300
Differential D98668
Support !heapallocsite attachments in StripDebugInfo(). Authored by aprantl on Mar 15 2021, 4:26 PM.
Details They point into the DIType type system, so they need to be stripped as well. rdar://75341300
Diff Detail
Unit Tests Event Timeline
| ||||||||||||
Is it possible to reach this when the instruction has no heapallocsite metadata?
If so, we might want a narrower change, like:
if (auto *MD = I.getMetadata("heapallocsite")) I.setMetadata("heapallocsite", nullptr);Or we might want to guarantee that we drop non-debug metadata, like:
Ditto for D98667.