summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-01-19 21:33:13 +0000
committerHans Wennborg <hans@hanshq.net>2017-01-19 21:33:13 +0000
commit7c650777b04d9e2e0e3b46cd7228f7dac4306eb9 (patch)
tree2ab9ab19bc0f79a7128daf15269b45d101f92c77 /clang/lib/CodeGen/CodeGenModule.cpp
parent68257700f8802b94a882f3c9e60b813bc8278983 (diff)
downloadbcm5719-llvm-7c650777b04d9e2e0e3b46cd7228f7dac4306eb9.tar.gz
bcm5719-llvm-7c650777b04d9e2e0e3b46cd7228f7dac4306eb9.zip
Don't inline dllimport functions referencing non-imported methods
This is another follow-up to r246338. I had assumed methods were already handled by the AST visitor, but turns out they weren't. llvm-svn: 292522
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index c9d9a35fb8a..67ea1bea49a 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1751,6 +1751,11 @@ namespace {
SafeToInline = E->getConstructor()->hasAttr<DLLImportAttr>();
return SafeToInline;
}
+ bool VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
+ CXXMethodDecl *M = E->getMethodDecl();
+ SafeToInline = M->hasAttr<DLLImportAttr>();
+ return SafeToInline;
+ }
bool VisitCXXDeleteExpr(CXXDeleteExpr *E) {
SafeToInline = E->getOperatorDelete()->hasAttr<DLLImportAttr>();
return SafeToInline;
OpenPOWER on IntegriCloud