From 963869e41af4f0f180cd13d3ad50f778f336c3b0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 17 Oct 2004 23:49:11 +0000 Subject: [PATCH] Print a semicolon for the unreacahble instruction. This fixes problems where C requires semicolons in some cases to indicate null statements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17107 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 2 +- lib/Target/CBackend/Writer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 96eb684d29e..9e835f6093b 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1212,7 +1212,7 @@ void CWriter::visitSwitchInst(SwitchInst &SI) { } void CWriter::visitUnreachableInst(UnreachableInst &I) { - Out << " /*UNREACHABLE*/\n"; + Out << " /*UNREACHABLE*/;\n"; } bool CWriter::isGotoCodeNecessary(BasicBlock *From, BasicBlock *To) { diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 96eb684d29e..9e835f6093b 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1212,7 +1212,7 @@ void CWriter::visitSwitchInst(SwitchInst &SI) { } void CWriter::visitUnreachableInst(UnreachableInst &I) { - Out << " /*UNREACHABLE*/\n"; + Out << " /*UNREACHABLE*/;\n"; } bool CWriter::isGotoCodeNecessary(BasicBlock *From, BasicBlock *To) {