Fix code emission for conditional branches.
[oota-llvm.git] / lib / Target / CppBackend / CPPBackend.cpp
index 6adb73ae259fd4b538bbbcef0eb656fc13a6bf59..bf9c885f37bf9730c4d683ea7e7d2f0728d4a202 100644 (file)
@@ -1092,9 +1092,9 @@ namespace {
       const BranchInst* br = cast<BranchInst>(I);
       Out << "BranchInst::Create(" ;
       if (br->getNumOperands() == 3 ) {
-        Out << opNames[0] << ", "
+        Out << opNames[2] << ", "
             << opNames[1] << ", "
-            << opNames[2] << ", ";
+            << opNames[0] << ", ";
 
       } else if (br->getNumOperands() == 1) {
         Out << opNames[0] << ", ";