diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index fb61651b3dc..dae830dee16 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -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"; }