summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-04-19 16:58:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-04-19 16:58:20 +0000
commit47cf5b581a3924803ec6ac431f44c650b1266a65 (patch)
tree8ab08e0f5cd9d78477f9cab503b64be75f0d6410 /clang/lib/CodeGen/CodeGenModule.cpp
parent145f3f1e83932a751ae434bafa42333d4cb2c157 (diff)
downloadbcm5719-llvm-47cf5b581a3924803ec6ac431f44c650b1266a65.tar.gz
bcm5719-llvm-47cf5b581a3924803ec6ac431f44c650b1266a65.zip
Add comment explaning the use of c99 inline in c++.
llvm-svn: 101787
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 9cb27cc1010..486c6948d17 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/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() &&
OpenPOWER on IntegriCloud