summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-15 09:22:45 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-15 09:22:45 +0000
commite3dc1707b530dd264417390f1510c99c166eb103 (patch)
tree930defae9890f4e57bda489693591a534d17341e /clang/lib/CodeGen/CodeGenFunction.cpp
parentcd3858b103195a2fa1ff2a5221e34d0680584c73 (diff)
downloadbcm5719-llvm-e3dc1707b530dd264417390f1510c99c166eb103.tar.gz
bcm5719-llvm-e3dc1707b530dd264417390f1510c99c166eb103.zip
Assorted cleanup:
- Have CGM precompute a number of commonly-used types - Have CGF copy that during initialization instead of recomputing them - Use TBAA info when initializing a parameter variable - Refactor the scalar ++/-- code llvm-svn: 125562
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 39aff78c73c..ee8b98cdd49 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -29,8 +29,8 @@ using namespace clang;
using namespace CodeGen;
CodeGenFunction::CodeGenFunction(CodeGenModule &cgm)
- : CGM(cgm), Target(CGM.getContext().Target),
- Builder(cgm.getModule().getContext()),
+ : CodeGenTypeCache(cgm), CGM(cgm),
+ Target(CGM.getContext().Target), Builder(cgm.getModule().getContext()),
BlockInfo(0), BlockPointer(0),
NormalCleanupDest(0), EHCleanupDest(0), NextCleanupDestIndex(1),
ExceptionSlot(0), DebugInfo(0), IndirectBranch(0),
@@ -40,14 +40,6 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm)
OutermostConditional(0), TerminateLandingPad(0), TerminateHandler(0),
TrapBB(0) {
- // Get some frequently used types.
- LLVMPointerWidth = Target.getPointerWidth(0);
- llvm::LLVMContext &LLVMContext = CGM.getLLVMContext();
- IntPtrTy = llvm::IntegerType::get(LLVMContext, LLVMPointerWidth);
- Int32Ty = llvm::Type::getInt32Ty(LLVMContext);
- Int64Ty = llvm::Type::getInt64Ty(LLVMContext);
- Int8PtrTy = cgm.Int8PtrTy;
-
Exceptions = getContext().getLangOptions().Exceptions;
CatchUndefined = getContext().getLangOptions().CatchUndefined;
CGM.getCXXABI().getMangleContext().startNewFunction();
OpenPOWER on IntegriCloud