diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-08-25 22:46:27 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-08-25 22:46:27 +0000 |
commit | 7463ed7c89f487fe0290c16b04caa24ca496131e (patch) | |
tree | 19e8b5554d54fa57faf8426a150c3002feda45d7 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 0300813d6af5fe34768db5a6249c9d872ee1d9bc (diff) | |
download | llvm-7463ed7c89f487fe0290c16b04caa24ca496131e.zip llvm-7463ed7c89f487fe0290c16b04caa24ca496131e.tar.gz llvm-7463ed7c89f487fe0290c16b04caa24ca496131e.tar.bz2 |
CodeGen: Unify two implementations of canDevirtualizeMemberFunctionCall.
They were mostly copy&paste of each other, move it to CodeGenFunction. Of course
the two implementations have diverged over time; the one in CGExprCXX seems to
be the more modern one so I picked that one and moved it to CGClass which feels
like a better home for it. No intended functionality change.
llvm-svn: 189203
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index f8dcfa3..ff7b700 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1196,6 +1196,12 @@ public: /// to by This. llvm::Value *GetVTablePtr(llvm::Value *This, llvm::Type *Ty); + + /// CanDevirtualizeMemberFunctionCalls - Checks whether virtual calls on given + /// expr can be devirtualized. + bool CanDevirtualizeMemberFunctionCall(const Expr *Base, + const CXXMethodDecl *MD); + /// EnterDtorCleanups - Enter the cleanups necessary to complete the /// given phase of destruction for a destructor. The end result /// should call destructors on members and base classes in reverse |