Fix for bug 39218
This patch seems to fix this issue. However, from a code standpoint, I'm not sure it is up to standards. I am submitting this to see if it is directionally correct, and seeking feedback for a better way to accomplish this.
Questions I have:
- Are the modifications to the test correct? The code seems to function (it passes check-llvm, check-clang, and manual testing of the example with GCC). I am not very familiar with comdats or COFF, and therefore I am not 100% confident in the test case.
- Is GO->getComdat()->getName() the correct place to get the name, or is it a coincidence that it contains the right data?
Any feedback is welcome, and I am happy to submit another patch incorporating any suggested changes.