diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-10-27 19:13:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-10-27 19:13:16 +0000 |
| commit | 3ed871fe626408591fc9dcbccd7d61696ad72335 (patch) | |
| tree | c7091596f0ce2ecf767758f356c2f1725cc05e1d /llvm/lib/VMCore/AsmWriter.cpp | |
| parent | df5dcdaa10f556693a58e1956468b1113b9c79fb (diff) | |
| download | bcm5719-llvm-3ed871fe626408591fc9dcbccd7d61696ad72335.tar.gz bcm5719-llvm-3ed871fe626408591fc9dcbccd7d61696ad72335.zip | |
add enough support for indirect branch for the feature test to pass
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.
llvm-svn: 85274
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 59ee3757a33..5a92432062e 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -1832,7 +1832,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { writeOperand(BI.getSuccessor(1), true); } else if (isa<SwitchInst>(I)) { - // Special case switch statement to get formatting nice and correct... + // Special case switch instruction to get formatting nice and correct. Out << ' '; writeOperand(Operand , true); Out << ", "; @@ -1846,6 +1846,19 @@ void AssemblyWriter::printInstruction(const Instruction &I) { writeOperand(I.getOperand(op+1), true); } Out << "\n ]"; + } else if (isa<IndBrInst>(I)) { + // Special case indbr instruction to get formatting nice and correct. + Out << ' '; + writeOperand(Operand, true); + Out << ", "; + Out << " ["; + + for (unsigned i = 1, e = I.getNumOperands(); i != e; ++i) { + if (i != 1) + Out << ", "; + writeOperand(I.getOperand(i), true); + } + Out << ']'; } else if (isa<PHINode>(I)) { Out << ' '; TypePrinter.print(I.getType(), Out); |

