More work to support -fapple-kext regarding 
indirect vf calls and addition of extra entry
at bottom of vtbls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124507 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp
index 513d80b..03b90e2 100644
--- a/lib/CodeGen/CGExprCXX.cpp
+++ b/lib/CodeGen/CGExprCXX.cpp
@@ -195,6 +195,7 @@
       Callee = BuildVirtualCall(MD, This, Ty); 
   } else {
     if (getContext().getLangOptions().AppleKext &&
+        MD->isVirtual() &&
         ME->hasQualifier())
       Callee = BuildAppleKextVirtualCall(MD, ME->getQualifier(), This, Ty);
     else