Don't use PassInfo* as a type identifier for passes. Instead, use the address of...
[oota-llvm.git] / lib / Target / Alpha / AlphaBranchSelector.cpp
index 65bacb8a749006fa0069aeab8213ad4ca6f95791..37681170953698354b43a5cbdf09ef96ccc2879a 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.
 //
 //===----------------------------------------------------------------------===//
 //
 #include "Alpha.h"
 #include "AlphaInstrInfo.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/Support/Compiler.h"
 #include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetAsmInfo.h"
+#include "llvm/MC/MCAsmInfo.h"
 using namespace llvm;
 
 namespace {
-  struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass {
+  struct AlphaBSel : public MachineFunctionPass {
+    static char ID;
+    AlphaBSel() : MachineFunctionPass(ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 
@@ -29,6 +30,7 @@ namespace {
       return "Alpha Branch Selection";
     }
   };
+  char AlphaBSel::ID = 0;
 }
 
 /// createAlphaBranchSelectionPass - returns an instance of the Branch Selection
@@ -54,7 +56,7 @@ bool AlphaBSel::runOnMachineFunction(MachineFunction &Fn) {
         // 1. reg
         // 2. target MBB
         const TargetInstrInfo *TII = Fn.getTarget().getInstrInfo();
-        MBBI->setInstrDescriptor(TII->get(MBBI->getOperand(0).getImm()));
+        MBBI->setDesc(TII->get(MBBI->getOperand(0).getImm()));
       }
     }
   }