clangir
clangir copied to clipboard
Module verification error of switch statements
struct St{
~St(){}
};
int f(int a) {
switch(a) {
case 1:{
St a;
return 1;
}
}
return 0;
}
fatal error: error in backend: CIR codegen: module verification error before running CIR passes
I know it's a verification error about SwitchOp, do we have some methods to print more information (e.g. the illegal cir body)?
do we have some methods to print more information (e.g. the illegal cir body)?
Try -Xclang -clangir-disable-verifier -Xclang -clangir-disable-passes
Interesting, it usually says at least something about what failed to verify. Anyways, use the suggestions from Lancern to isolate the CIR output that can help you understand the bad IR