Fix spelling and grammar in a comment.
[oota-llvm.git] / lib / Target / Alpha / AlphaBranchSelector.cpp
index 55140e34e432ba58a41377eea2d8cdf4fa7d7a37..f1d60c836f7be437a6a6e179b480216aeb213515 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Andrew Lenharth and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -22,6 +22,8 @@ using namespace llvm;
 
 namespace {
   struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass {
+    static char ID;
+    AlphaBSel() : MachineFunctionPass((intptr_t)&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 
@@ -29,6 +31,7 @@ namespace {
       return "Alpha Branch Selection";
     }
   };
+  char AlphaBSel::ID = 0;
 }
 
 /// createAlphaBranchSelectionPass - returns an instance of the Branch Selection
@@ -53,7 +56,8 @@ bool AlphaBSel::runOnMachineFunction(MachineFunction &Fn) {
         // 0. bc opcode
         // 1. reg
         // 2. target MBB
-        MBBI->setOpcode(MBBI->getOperand(0).getImm());
+        const TargetInstrInfo *TII = Fn.getTarget().getInstrInfo();
+        MBBI->setDesc(TII->get(MBBI->getOperand(0).getImm()));
       }
     }
   }