summaryrefslogtreecommitdiffstats
path: root/clang/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
commit347132b32f69c9d4abb1cdcb5329f56f98904440 (patch)
tree605ce847ef56ec8a09586059b3e60b816f15b687 /clang/lib/CodeGen/CGCXX.cpp
parent37f106e18c67944888f789a2192cb4cd4928417e (diff)
downloadbcm5719-llvm-347132b32f69c9d4abb1cdcb5329f56f98904440.tar.gz
bcm5719-llvm-347132b32f69c9d4abb1cdcb5329f56f98904440.zip
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). llvm-svn: 96403
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 28c4c6b4b57..c4c52aac034 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/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));
OpenPOWER on IntegriCloud