diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-01-31 01:31:59 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-01-31 01:31:59 +0000 |
commit | 9411cd2570e6b29ce645f9a2bf4955d32d4fd342 (patch) | |
tree | 33631e2ef486666c9856c85686178d744d50b175 /lib/VMCore | |
parent | 3edbcada5733c2c13f71b72528e81c407e39aa42 (diff) | |
download | external_llvm-9411cd2570e6b29ce645f9a2bf4955d32d4fd342.zip external_llvm-9411cd2570e6b29ce645f9a2bf4955d32d4fd342.tar.gz external_llvm-9411cd2570e6b29ce645f9a2bf4955d32d4fd342.tar.bz2 |
back out my previous change, it exposes a latent bug. investigating
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 0322d66..6a17516 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1505,14 +1505,13 @@ void AssemblyWriter::printInstruction(const Instruction &I) { const Value *Operand = I.getNumOperands() ? I.getOperand(0) : 0; // Special case conditional branches to swizzle the condition out to the front - if (isa<BranchInst>(I) && cast<BranchInst>(I).isConditional()) { - BranchInst &BI(cast<BranchInst>(I)); + if (isa<BranchInst>(I) && I.getNumOperands() > 1) { Out << ' '; - writeOperand(BI.getCondition(), true); + writeOperand(I.getOperand(2), true); Out << ", "; - writeOperand(BI.getSuccessor(0), true); + writeOperand(Operand, true); Out << ", "; - writeOperand(BI.getSuccessor(1), true); + writeOperand(I.getOperand(1), true); } else if (isa<SwitchInst>(I)) { // Special case switch statement to get formatting nice and correct... |