Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).

llvm-svn: 99385
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index c9b099b..3854c40 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -3918,7 +3918,7 @@
   GenerateVTT(Linkage, /*GenerateDefinition=*/true, RD);
 }
 
-llvm::Constant *CodeGenVTables::getAddrOfVTable(const CXXRecordDecl *RD) {
+llvm::Constant *CodeGenVTables::GetAddrOfVTable(const CXXRecordDecl *RD) {
   llvm::SmallString<256> OutName;
   CGM.getMangleContext().mangleCXXVtable(RD, OutName);
   llvm::StringRef Name = OutName.str();
@@ -3926,7 +3926,7 @@
   const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(CGM.getLLVMContext());
   llvm::ArrayType *ArrayType = llvm::ArrayType::get(Int8PtrTy, 0);
   
-  llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);
+  llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name);
   if (GV) {
     if (!GV->isDeclaration() || GV->getType()->getElementType() == ArrayType)
       return GV;