Factor some code into a new EmitFrames method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131119 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index 3da5b49..12aeb4f 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -377,8 +377,7 @@
 }
 
 void MCMachOStreamer::Finish() {
-  if (getNumFrameInfos())
-    MCDwarfFrameEmitter::Emit(*this, true);
+  EmitFrames(true);
 
   // We have to set the fragment atom associations so we can relax properly for
   // Mach-O.