aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-16 22:04:33 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-16 22:04:33 +0000
commit2504941793b549323f9d29c62507cf21d865fade (patch)
tree32dbfa806279e353f06a02518c75f8159021a4f9 /lib/CodeGen/CGCXX.cpp
parentd19429f01a4169b573cafa466dd7a09a51e5fd92 (diff)
IRgen optimization: cache the value of 'this' and 'vtt' instead of
repeatedly reloading from an alloca. We still need to create the alloca for debug info purposes (although we currently create it in all cases because of some abstraction boundaries that're hard to break down). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 28c4c6b4b5..c4c52aac03 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -28,18 +28,6 @@ using namespace CodeGen;
-llvm::Value *CodeGenFunction::LoadCXXThis() {
- assert(isa<CXXMethodDecl>(CurFuncDecl) &&
- "Must be in a C++ member function decl to load 'this'");
- assert(cast<CXXMethodDecl>(CurFuncDecl)->isInstance() &&
- "Must be in a C++ member function decl to load 'this'");
-
- // FIXME: What if we're inside a block?
- // ans: See how CodeGenFunction::LoadObjCSelf() uses
- // CodeGenFunction::BlockForwardSelf() for how to do this.
- return Builder.CreateLoad(LocalDeclMap[CXXThisDecl], "this");
-}
-
void CodeGenModule::EmitCXXConstructors(const CXXConstructorDecl *D) {
EmitGlobal(GlobalDecl(D, Ctor_Complete));
EmitGlobal(GlobalDecl(D, Ctor_Base));