]> granicus.if.org Git - clang/commitdiff
Add comment explaning the use of c99 inline in c++.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 19 Apr 2010 16:58:20 +0000 (16:58 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 19 Apr 2010 16:58:20 +0000 (16:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101787 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 9cb27cc1010b85b4eb001eceba983b929e40e3e2..486c6948d1748c7a3e818075bea99a0d4cf4eb7d 100644 (file)
@@ -315,6 +315,10 @@ GetLinkageForFunction(ASTContext &Context, const FunctionDecl *FD,
                                        == TSK_ExplicitInstantiationDeclaration)
     return CodeGenModule::GVA_C99Inline;
 
+  // If this is a virtual method and its class has a key method in another
+  // translation unit, we know that this method will be present in that
+  // translation unit. In this translation unit we will use this method
+  // only for inlining and analysis. This is the semantics of c99 inline.
   if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
     const CXXRecordDecl *RD = MD->getParent();
     if (MD->isVirtual() &&