Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188870 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h
index bd70b5c..e4f5366 100644
--- a/lib/CodeGen/CGVTables.h
+++ b/lib/CodeGen/CGVTables.h
@@ -31,6 +31,8 @@
 class CodeGenVTables {
   CodeGenModule &CGM;
 
+  // FIXME: Consider moving VTContext and VFTContext into respective CXXABI
+  // classes?
   VTableContext VTContext;
   OwningPtr<MicrosoftVFTableContext> VFTContext;
 
@@ -78,6 +80,8 @@
 
   VTableContext &getVTableContext() { return VTContext; }
 
+  MicrosoftVFTableContext &getVFTableContext() { return *VFTContext.get(); }
+
   /// getSubVTTIndex - Return the index of the sub-VTT for the base class of the
   /// given record decl.
   uint64_t getSubVTTIndex(const CXXRecordDecl *RD, BaseSubobject Base);