Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class.  Minor other refactorings.

Fixed a few address-space bugs while I was there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCleanup.cpp b/lib/CodeGen/CGCleanup.cpp
index 3c4d80f..374ede8 100644
--- a/lib/CodeGen/CGCleanup.cpp
+++ b/lib/CodeGen/CGCleanup.cpp
@@ -784,7 +784,7 @@
       // Optimistically hope that any fixups will continue falling through.
       for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();
            I < E; ++I) {
-        BranchFixup &Fixup = CGF.EHStack.getBranchFixup(I);
+        BranchFixup &Fixup = EHStack.getBranchFixup(I);
         if (!Fixup.Destination) continue;
         if (!Fixup.OptimisticBranchBlock) {
           new llvm::StoreInst(Builder.getInt32(Fixup.DestinationIndex),
@@ -846,7 +846,7 @@
       if (NewNormalEntry != NormalEntry && NormalEntry == NormalExit)
         for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();
                I < E; ++I)
-          CGF.EHStack.getBranchFixup(I).OptimisticBranchBlock = NewNormalEntry;
+          EHStack.getBranchFixup(I).OptimisticBranchBlock = NewNormalEntry;
     }
   }