Move the personality function from LandingPadInst to Function
[oota-llvm.git] / lib / CodeGen / AsmPrinter / AsmPrinter.cpp
index 4c194c263b0fb2243c729da2910019f5ab645a5d..3c2f1d9ebcfc09ee30f583dcb7995b61e37588e4 100644 (file)
@@ -548,6 +548,10 @@ void AsmPrinter::EmitFunctionHeader() {
   if (F->hasPrefixData())
     EmitGlobalConstant(F->getPrefixData());
 
+  // Emit the personality function.
+  if (F->hasPersonalityFn())
+    EmitGlobalConstant(F->getPersonalityFn());
+
   // Emit the CurrentFnSym.  This is a virtual function to allow targets to
   // do their wild and crazy things as required.
   EmitFunctionEntryLabel();