diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-04-19 16:58:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-04-19 16:58:20 +0000 |
commit | b1af4c810fbf71d70d356c6244b157784e0d1405 (patch) | |
tree | 0f90a7d42180332a28245de68f6e384045ed6f7a /lib/CodeGen/CodeGenModule.cpp | |
parent | cb421fa690da545b58a720abe5f1c49b166dbde7 (diff) |
Add comment explaning the use of c99 inline in c++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 9cb27cc101..486c6948d1 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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() && |