Print a semicolon for the unreacahble instruction. This fixes problems
authorChris Lattner <sabre@nondot.org>
Sun, 17 Oct 2004 23:49:11 +0000 (23:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Oct 2004 23:49:11 +0000 (23:49 +0000)
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
lib/Target/CBackend/Writer.cpp

index 96eb684d29e7e46ee51b9e2fc0f84635086a4ae0..9e835f6093bfc066715758da102e16cd5bbc5b8c 100644 (file)
@@ -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) {
index 96eb684d29e7e46ee51b9e2fc0f84635086a4ae0..9e835f6093bfc066715758da102e16cd5bbc5b8c 100644 (file)
@@ -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) {