CBE support for indbr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-10-27 21:21:06 +00:00
parent f9d078e336
commit f0dca28da7

View File

@ -282,6 +282,7 @@ namespace {
void visitReturnInst(ReturnInst &I);
void visitBranchInst(BranchInst &I);
void visitSwitchInst(SwitchInst &I);
void visitIndBrInst(IndBrInst &I);
void visitInvokeInst(InvokeInst &I) {
llvm_unreachable("Lowerinvoke pass didn't work!");
}
@ -2578,6 +2579,12 @@ void CWriter::visitSwitchInst(SwitchInst &SI) {
Out << " }\n";
}
void CWriter::visitIndBrInst(IndBrInst &IBI) {
Out << " goto *(void*)(";
writeOperand(IBI.getOperand(0));
Out << ");\n";
}
void CWriter::visitUnreachableInst(UnreachableInst &I) {
Out << " /*UNREACHABLE*/;\n";
}