Classify functions by EH personality type rather than using the triple
[oota-llvm.git] / lib / CodeGen / AsmPrinter / Win64Exception.cpp
index 73278c835bc9f6f4d821255dafd5b96f2199164a..a1719a51889034be02266568bc867a2df3a75ddc 100644 (file)
@@ -105,8 +105,8 @@ 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->getPersonality();
-    if (Per && Per->getName() == "__C_specific_handler")
+    EHPersonality Per = MMI->getPersonalityType();
+    if (Per == EHPersonality::Win64SEH)
       emitCSpecificHandlerTable();
     else
       emitExceptionTable();