Use MMI->getPersonality() instead of MMI->getPersonalities()[MMI->getPersonalityIndex()]
[oota-llvm.git] / lib / CodeGen / AsmPrinter / Win64Exception.cpp
index 84549ae95aefc2570cce95c2c71435f4f6513aa7..567e0651e34f941e9ced6f82d4bfd29f65547fc3 100644 (file)
@@ -60,7 +60,7 @@ void Win64Exception::beginFunction(const MachineFunction *MF) {
 
   const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
   unsigned PerEncoding = TLOF.getPersonalityEncoding();
-  const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()];
+  const Function *Per = MF->getMMI().getPersonality();
 
   shouldEmitPersonality = hasLandingPads &&
     PerEncoding != dwarf::DW_EH_PE_omit && Per;
@@ -105,7 +105,7 @@ void Win64Exception::endFunction(const MachineFunction *) {
 
     // Emit the tables appropriate to the personality function in use. If we
     // don't recognize the personality, assume it uses an Itanium-style LSDA.
-    const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()];
+    const Function *Per = MMI->getPersonality();
     if (Per->getName() == "__C_specific_handler")
       emitCSpecificHandlerTable();
     else