MSVC can compile "LoopID->getOperand(0) == LoopID" when LoopID is MDNode*.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I suspect the issue you saw is a bug in MSVC. There is a path from MDOperand & to const MDNode *. http://llvm.org/docs/doxygen/html/Metadata_8h_source.html#l00547 defines a type caster from MDOperand & to Metadata *, Metadata is a super class of MDNode, and finally changing constness is a valid implicit cast.
Anyhow, I noticed Loop::getLoopID() returns MDNode * instead of const MDNode *, and using MDNode * seems to work for MSVC. Therefore, I took this approach. Did you confirm it does fix the building error on your end?