On Fri, Dec 21, 2018 at 12:35 PM Phil Camp via Phabricator <revi...@reviews.llvm.org> wrote: > > FlameTop added a comment. > > I'm afraid we are seeing a build failure here on our local Windows checking > MSVC build. Unfortunately I cannot find a public buildbot that uses the exact > configuration that causes the assertion. The assertion we are seeing is > > Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", > file F:\merge3\o\llvm\include\llvm/Support/Casting.h, line 255 > > It would appear it will not allow a cast from 'Init' to 'BitInit'. There is a > very similar routine in the file X86EX2VEXTTablesEmitter.cpp as follows > > static inline uint64_t getValueFromBitsInit(const BitsInit *B) { > uint64_t Value = 0; > for (unsigned i = 0, e = B->getNumBits(); i != e; ++i) { > > if (BitInit *Bit = dyn_cast<BitInit>(B->getBit(i))) > Value |= uint64_t(Bit->getValue()) << i; > else > PrintFatalError("Invalid VectSize bit"); > > } > return Value; > } > > Which appears to serve the same purpose but uses a dynamic cast. If I replace > your routine with this technique our build succeeds.
Thank you for the note, I've updated this code in r349940 to use a dyn_cast instead. ~Aaron > > regards > > Phil Camp, SIE > > > CHANGES SINCE LAST ACTION > https://reviews.llvm.org/D55792/new/ > > https://reviews.llvm.org/D55792 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits