[PATCH] D55792: Allow direct navigation to static analysis checker documentation through SARIF exports
Phil Camp via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 21 09:35:07 PST 2018
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.
regards
Phil Camp, SIE
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55792/new/
https://reviews.llvm.org/D55792
More information about the cfe-commits
mailing list